예제 #1
0
 public unsafe void Reset()
 {
     state = BusyState;
     pending.Reset();
     fixed(byte *mem = engine.memFix)
     {
         engine.Reset(mem);
     }
 }
예제 #2
0
 public unsafe Deflater(int level, int tooFar)
 {
     if (level < NoCompression || level > BestCompression)
     {
         throw new ArgumentOutOfRangeException("level");
     }
     if (tooFar < 0 || tooFar > 32767)
     {
         throw new ArgumentOutOfRangeException("tooFar");
     }
     this.level = level;
     pending    = new PendingBuffer(DeflaterConstants.PendingBufSize);
     engine     = new DeflaterEngine(pending, level, tooFar);
     state      = BusyState;
     pending.Reset();
     fixed(byte *mem = engine.memFix)
     {
         engine.Reset(mem);
     }
 }