internal DeflaterManaged() {
            deflateEncoder = new FastEncoder();
            copyEncoder = new CopyEncoder();
            input = new DeflateInput();
            output = new OutputBuffer();

            processingState = DeflaterState.NotStarted;
        }
Exemple #2
0
 internal DeflaterManaged()
 {
     this.deflateEncoder  = new FastEncoder();
     this.copyEncoder     = new CopyEncoder();
     this.input           = new DeflateInput();
     this.output          = new OutputBuffer();
     this.processingState = DeflaterManaged.DeflaterState.NotStarted;
 }
        internal DeflaterManaged()
        {
            deflateEncoder = new FastEncoder();
            copyEncoder    = new CopyEncoder();
            input          = new DeflateInput();
            output         = new OutputBuffer();

            processingState = DeflaterState.NotStarted;
        }
Exemple #4
0
 private void GetCompressedOutput(OutputBuffer output)
 {
     while (this.inputWindow.BytesAvailable > 0 && this.SafeToWriteTo(output))
     {
         this.inputWindow.GetNextSymbolOrMatch(this.currentMatch);
         if (this.currentMatch.State == MatchState.HasSymbol)
         {
             FastEncoder.WriteChar(this.currentMatch.Symbol, output);
         }
         else if (this.currentMatch.State == MatchState.HasMatch)
         {
             FastEncoder.WriteMatch(this.currentMatch.Length, this.currentMatch.Position, output);
         }
         else
         {
             FastEncoder.WriteChar(this.currentMatch.Symbol, output);
             FastEncoder.WriteMatch(this.currentMatch.Length, this.currentMatch.Position, output);
         }
     }
 }
Exemple #5
0
 internal void GetBlockHeader(OutputBuffer output)
 {
     FastEncoder.WriteDeflatePreamble(output);
 }
Exemple #6
0
 internal void GetBlock(DeflateInput input, OutputBuffer output, int maxBytesToCopy)
 {
     FastEncoder.WriteDeflatePreamble(output);
     this.GetCompressedOutput(input, output, maxBytesToCopy);
     this.WriteEndOfBlock(output);
 }