Show / Hide Table of Contents

Namespace ICSharpCode.SharpZipLib.Zip.Compression

Classes

Deflater

This is the Deflater class. The deflater class compresses input with the deflate algorithm described in RFC 1951. It has several compression levels and three different strategies described below.

This class is not thread safe. This is inherent in the API, due to the split of deflate and setInput.

author of the original java version : Jochen Hoenicke

DeflaterConstants

This class contains constants used for deflation.

DeflaterEngine

Low level compression engine for deflate algorithm which uses a 32K sliding window with secondary compression from Huffman/Shannon-Fano codes.

DeflaterHuffman

This is the DeflaterHuffman class.

This class is not thread safe. This is inherent in the API, due to the split of Deflate and SetInput.

author of the original java version : Jochen Hoenicke

DeflaterPending

This class stores the pending output of the Deflater.

author of the original java version : Jochen Hoenicke

Inflater

Inflater is used to decompress data that has been compressed according to the "deflate" standard described in rfc1951.

By default Zlib (rfc1950) headers and footers are expected in the input. You can use constructor

 public Inflater(bool noHeader)
passing true if there is no Zlib header information

The usage is as following. First you have to set some input with

SetInput()
, then Inflate() it. If inflate doesn't

inflate any bytes there may be three reasons:

  • IsNeedingInput() returns true because the input buffer is empty. You have to provide more input with
    SetInput()
    . NOTE: IsNeedingInput() also returns true when, the stream is finished.
  • IsNeedingDictionary() returns true, you have to provide a preset dictionary with
    SetDictionary()
    .
  • IsFinished returns true, the inflater has finished.
Once the first output byte is produced, a dictionary will not be needed at a later stage.

author of the original java version : John Leuner, Jochen Hoenicke

InflaterHuffmanTree

Huffman tree used for inflation

PendingBuffer

This class is general purpose class for writing data to a buffer.

It allows you to write bits as well as bytes Based on DeflaterPending.java

author of the original java version : Jochen Hoenicke

Enums

Deflater.CompressionLevel

Compression Level as an enum for safer use

DeflateStrategy

Strategies for deflater

In This Article
Back to top Copyright © 2000-2022 SharpZipLib Contributors