Package lzma.sdk.lzma

Class Encoder


  • public class Encoder
    extends java.lang.Object
    • Field Detail

      • g_FastPos

        static byte[] g_FastPos
      • _state

        int _state
      • _previousByte

        byte _previousByte
      • _repDistances

        int[] _repDistances
      • _matchFinder

        BinTree _matchFinder
      • _rangeEncoder

        Encoder _rangeEncoder
      • _isMatch

        short[] _isMatch
      • _isRep

        short[] _isRep
      • _isRepG0

        short[] _isRepG0
      • _isRepG1

        short[] _isRepG1
      • _isRepG2

        short[] _isRepG2
      • _isRep0Long

        short[] _isRep0Long
      • _posEncoders

        short[] _posEncoders
      • _matchDistances

        int[] _matchDistances
      • _numFastBytes

        int _numFastBytes
      • _longestMatchLength

        int _longestMatchLength
      • _numDistancePairs

        int _numDistancePairs
      • _additionalOffset

        int _additionalOffset
      • _optimumEndIndex

        int _optimumEndIndex
      • _optimumCurrentIndex

        int _optimumCurrentIndex
      • _longestMatchWasFound

        boolean _longestMatchWasFound
      • _posSlotPrices

        int[] _posSlotPrices
      • _distancesPrices

        int[] _distancesPrices
      • _alignPrices

        int[] _alignPrices
      • _alignPriceCount

        int _alignPriceCount
      • _distTableSize

        int _distTableSize
      • _posStateBits

        int _posStateBits
      • _posStateMask

        int _posStateMask
      • _numLiteralPosStateBits

        int _numLiteralPosStateBits
      • _numLiteralContextBits

        int _numLiteralContextBits
      • _dictionarySize

        int _dictionarySize
      • _dictionarySizePrev

        int _dictionarySizePrev
      • _numFastBytesPrev

        int _numFastBytesPrev
      • nowPos64

        long nowPos64
      • _finished

        boolean _finished
      • _inStream

        java.io.InputStream _inStream
      • _matchFinderType

        int _matchFinderType
      • _writeEndMark

        boolean _writeEndMark
      • _needReleaseMFStream

        boolean _needReleaseMFStream
      • reps

        int[] reps
      • repLens

        int[] repLens
      • backRes

        int backRes
      • processedInSize

        long[] processedInSize
      • processedOutSize

        long[] processedOutSize
      • finished

        boolean[] finished
      • properties

        byte[] properties
      • tempPrices

        int[] tempPrices
      • _matchPriceCount

        int _matchPriceCount
    • Constructor Detail

      • Encoder

        public Encoder()
    • Method Detail

      • getPosSlot

        static int getPosSlot​(int pos)
      • getPosSlot2

        static int getPosSlot2​(int pos)
      • baseInit

        void baseInit()
      • create

        void create()
      • init

        void init()
      • readMatchDistances

        int readMatchDistances()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • movePos

        void movePos​(int num)
              throws java.io.IOException
        Throws:
        java.io.IOException
      • getRepLen1Price

        int getRepLen1Price​(int state,
                            int posState)
      • getPureRepPrice

        int getPureRepPrice​(int repIndex,
                            int state,
                            int posState)
      • getRepPrice

        int getRepPrice​(int repIndex,
                        int len,
                        int state,
                        int posState)
      • getPosLenPrice

        int getPosLenPrice​(int pos,
                           int len,
                           int posState)
      • backward

        int backward​(int cur)
      • getOptimum

        int getOptimum​(int position)
                throws java.io.IOException
        Throws:
        java.io.IOException
      • writeEndMarker

        void writeEndMarker​(int posState)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • flush

        void flush​(int nowPos)
            throws java.io.IOException
        Throws:
        java.io.IOException
      • codeOneBlock

        public void codeOneBlock​(long[] inSize,
                                 long[] outSize,
                                 boolean[] finished)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • releaseMFStream

        void releaseMFStream()
      • setOutStream

        void setOutStream​(java.io.OutputStream outStream)
      • releaseOutStream

        void releaseOutStream()
      • releaseStreams

        void releaseStreams()
      • setStreams

        void setStreams​(java.io.InputStream inStream,
                        java.io.OutputStream outStream)
      • code

        public void code​(java.io.InputStream inStream,
                         java.io.OutputStream outStream,
                         long inSize,
                         long outSize,
                         ICodeProgress progress)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • writeCoderProperties

        public void writeCoderProperties​(java.io.OutputStream outStream)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • fillDistancesPrices

        void fillDistancesPrices()
      • fillAlignPrices

        void fillAlignPrices()
      • setAlgorithm

        public boolean setAlgorithm​(int algorithm)
      • setDictionarySize

        public boolean setDictionarySize​(int dictionarySize)
      • setNumFastBytes

        public boolean setNumFastBytes​(int numFastBytes)
      • setMatchFinder

        public boolean setMatchFinder​(int matchFinderIndex)
      • setLcLpPb

        public boolean setLcLpPb​(int lc,
                                 int lp,
                                 int pb)
      • setEndMarkerMode

        public void setEndMarkerMode​(boolean endMarkerMode)