Zlib Namespace Reference

Classes

class  DeflateManager
 
class  DeflateStream
 A class for compressing and decompressing streams using the Deflate algorithm. More...
 
class  InflateBlocks
 
class  InternalInflateConstants
 
class  InflateCodes
 
class  InflateManager
 
class  InfTree
 
class  ZlibException
 A general purpose exception class for exceptions in the Zlib library. More...
 
class  SharedUtils
 
class  InternalConstants
 
class  StaticTree
 
class  Adler
 Computes an Adler-32 checksum. More...
 
class  ZlibBaseStream
 
class  ZlibCodec
 Encoder and Decoder for ZLIB and DEFLATE (IETF RFC1950 and RFC1951). More...
 
class  ZlibConstants
 A bunch of constants used in the Zlib interface. More...
 
class  Tree
 

Enumerations

enum Zlib.BlockState
package
Enumerator
NeedMore 
BlockDone 
FinishStarted 
FinishDone 

The compression level to be used when using a DeflateStream or ZlibStream with CompressionMode.Compress.

Enumerator
None 

None means that the data will be simply stored, with no change at all. If you are producing ZIPs for use on Mac OSX, be aware that archives produced with CompressionLevel.None cannot be opened with the default zip reader. Use a different CompressionLevel.

Level0 

Same as None.

BestSpeed 

The fastest but least effective compression.

Level1 

A synonym for BestSpeed.

Level2 

A little slower, but better, than level 1.

Level3 

A little slower, but better, than level 2.

Level4 

A little slower, but better, than level 3.

Level5 

A little slower than level 4, but with better compression.

Default 

The default compression level, with a good balance of speed and compression efficiency.

Level6 

A synonym for Default.

Level7 

Pretty good compression!

Level8 

Better compression than Level7!

BestCompression 

The "best" compression, where best means greatest reduction in size of the input data stream. This is also the slowest compression.

Level9 

A synonym for BestCompression.

An enum to specify the direction of transcoding - whether to compress or decompress.

Enumerator
Compress 

Used to specify that the stream should compress the data.

Decompress 

Used to specify that the stream should decompress the data.

Describes options for how the compression algorithm is executed. Different strategies work better on different sorts of data. The strategy parameter can affect the compression ratio and the speed of compression but not the correctness of the compresssion.

Enumerator
Default 

The default strategy is probably the best for normal data.

Filtered 

The Filtered strategy is intended to be used most effectively with data produced by a filter or predictor. By this definition, filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better. The effect of Filtered is to force more Huffman coding and less string matching; it is a half-step between Default and HuffmanOnly.

HuffmanOnly 

Using HuffmanOnly will force the compressor to do Huffman encoding only, with no string matching.

enum Zlib.DeflateFlavor
package
Enumerator
Store 
Fast 
Slow 
enum Zlib.FlushType
package

Describes how to flush the current deflate operation.

The different FlushType values are useful when using a Deflate in a streaming application.

Enumerator
None 

No flush at all.

Partial 

Closes the current block, but doesn't flush it to the output. Used internally only in hypothetical scenarios. This was supposed to be removed by Zlib, but it is still in use in some edge cases.

Sync 

Use this during compression to specify that all pending output should be flushed to the output buffer and the output should be aligned on a byte boundary. You might use this in a streaming communication scenario, so that the decompressor can get all input data available so far. When using this with a ZlibCodec, AvailableBytesIn will be zero after the call if enough output space has been provided before the call. Flushing will degrade compression and so it should be used only when necessary.

Full 

Use this during compression to specify that all output should be flushed, as with FlushType.Sync, but also, the compression state should be reset so that decompression can restart from this point if previous compressed data has been damaged or if random access is desired. Using FlushType.Full too often can significantly degrade the compression.

Finish 

Signals the end of the compression/decompression stream.

enum Zlib.ZlibStreamFlavor
package
Enumerator
ZLIB 
DEFLATE 
GZIP