Esempio n. 1
0
 public LenEncoder()
 {
     for (UInt32 posState = 0; posState < Base.kNumPosStatesEncodingMax; posState++)
     {
         _lowCoder[posState] = new RangeCoder.BitTreeEncoder(Base.kNumLowLenBits);
         _midCoder[posState] = new RangeCoder.BitTreeEncoder(Base.kNumMidLenBits);
     }
 }
Esempio n. 2
0
 public Encoder()
 {
     for (int i = 0; i < kNumOpts; i++)
         _optimum[i] = new Optimal();
     for (int i = 0; i < Base.kNumLenToPosStates; i++)
         _posSlotEncoder[i] = new RangeCoder.BitTreeEncoder(Base.kNumPosSlotBits);
 }
Esempio n. 3
0
 public Encoder()
 {
     int num;
     this._state = new Base.State();
     this._repDistances = new uint[4];
     this._optimum = new Optimal[0x1000];
     this._matchFinder = null;
     this._rangeEncoder = new SharpCompress.Compressor.LZMA.RangeCoder.Encoder();
     this._isMatch = new BitEncoder[0xc0];
     this._isRep = new BitEncoder[12];
     this._isRepG0 = new BitEncoder[12];
     this._isRepG1 = new BitEncoder[12];
     this._isRepG2 = new BitEncoder[12];
     this._isRep0Long = new BitEncoder[0xc0];
     this._posSlotEncoder = new BitTreeEncoder[4];
     this._posEncoders = new BitEncoder[0x72];
     this._posAlignEncoder = new BitTreeEncoder(4);
     this._lenEncoder = new LenPriceTableEncoder();
     this._repMatchLenEncoder = new LenPriceTableEncoder();
     this._literalEncoder = new LiteralEncoder();
     this._matchDistances = new uint[0x224];
     this._numFastBytes = 0x20;
     this._posSlotPrices = new uint[0x100];
     this._distancesPrices = new uint[0x200];
     this._alignPrices = new uint[0x10];
     this._distTableSize = 0x2c;
     this._posStateBits = 2;
     this._posStateMask = 3;
     this._numLiteralPosStateBits = 0;
     this._numLiteralContextBits = 3;
     this._dictionarySize = 0x400000;
     this._dictionarySizePrev = uint.MaxValue;
     this._numFastBytesPrev = uint.MaxValue;
     this._matchFinderType = EMatchFinderType.BT4;
     this._writeEndMark = false;
     this.reps = new uint[4];
     this.repLens = new uint[4];
     this.properties = new byte[5];
     this.tempPrices = new uint[0x80];
     this._trainSize = 0;
     for (num = 0; num < 0x1000L; num++)
     {
         this._optimum[num] = new Optimal();
     }
     for (num = 0; num < 4L; num++)
     {
         this._posSlotEncoder[num] = new BitTreeEncoder(6);
     }
 }