Crate flate2 [] [src]

A DEFLATE-based stream compression/decompression library

This library is meant to supplement/replace the standard distributon's libflate library by providing a streaming encoder/decoder rather than purely an in-memory encoder/decoder.

Like with libflate, flate2 is based on miniz.c

Organization

This crate consists mainly of two modules, read and write. Each module contains a number of types used to encode and decode various streams of data. All types in the write module work on instances of Write, whereas all types in the read module work on instances of Read.

Other various types are provided at the top-level of the crate for management and dealing with encoders/decoders.

Helper traits

There are two helper traits provided: FlateReader and FlateWriter. These provide convenience methods for creating a decoder/encoder out of an already existing stream to chain construction.

Modules

bufread

Types which operate over BufRead streams, both encoders and decoders for various formats.

read

Types which operate over Read streams, both encoders and decoders for various formats.

write

Types which operate over Write streams, both encoders and decoders for various formats.

Structs

Compress

Raw in-memory compression stream for blocks of data.

DataError

Error returned when a decompression object finds that the input stream of bytes was not a valid input stream of bytes.

Decompress

Raw in-memory decompression stream for blocks of data.

GzBuilder

A builder structure to create a new gzip Encoder.

GzHeader

A structure representing the header of a gzip stream.

Enums

Compression

When compressing data, the compression level can be specified by a value in this enum.

Flush

Values which indicate the form of flushing to be used when compressing or decompressing in-memory data.

Status

Possible status results of compressing some data or successfully decompressing a block of data.

Traits

FlateReadExt

A helper trait to create encoder/decoders with method syntax.

FlateWriteExt

A helper trait to create encoder/decoders with method syntax.