internal DeflaterManaged() { deflateEncoder = new FastEncoder(); copyEncoder = new CopyEncoder(); input = new DeflateInput(); output = new OutputBuffer(); processingState = DeflaterState.NotStarted; }
internal DeflaterManaged() { this.deflateEncoder = new FastEncoder(); this.copyEncoder = new CopyEncoder(); this.input = new DeflateInput(); this.output = new OutputBuffer(); this.processingState = DeflaterManaged.DeflaterState.NotStarted; }
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); } } }
internal void GetBlockHeader(OutputBuffer output) { FastEncoder.WriteDeflatePreamble(output); }
internal void GetBlock(DeflateInput input, OutputBuffer output, int maxBytesToCopy) { FastEncoder.WriteDeflatePreamble(output); this.GetCompressedOutput(input, output, maxBytesToCopy); this.WriteEndOfBlock(output); }