[][src]Crate async_compression

Adaptors between compression crates and Rust's modern asynchronous IO types.

Feature Organization

This crate is divided up along two axes, which can each be individually selected via Cargo features.

All features are disabled by default, you should enable just the ones you need from the lists below.

If you want to pull in everything there are three group features defined:

FeatureDoes
allActivates all implementations and algorithms.
all-implementationsActivates all implementations, needs to be pared with a selection of algorithms
all-algorithmsActivates all algorithms, needs to be pared with a selection of implementations

IO implementation

The first division is which underlying asynchronous IO trait will be wrapped, these are available as separate features that have corresponding top-level modules:

FeatureType
bufreadfutures::io::AsyncBufRead
writefutures::io::AsyncWrite
streamfutures::stream::Stream<Item = std::io::Result<bytes::Bytes>>

Compression algorithm

The second division is which compression schemes to support, there are currently a few available choices, these determine which types will be available inside the above modules:

FeatureTypes
brotliBrotliEncoder, BrotliDecoder
bzipBzEncoder, BzDecoder
deflateDeflateEncoder, DeflateDecoder
gzipGzipEncoder, GzipDecoder
zlibZlibEncoder, ZlibDecoder
zstdZstdEncoder, ZstdDecoder

Modules

brotli2feature="brotli"

Types to configure brotli2 based encoders.

bufreadfeature="bufread"

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

bzip2feature="bzip"

Types to configure bzip2 based encoders.

flate2feature="deflate" or feature="zlib" or feature="gzip"

Types to configure flate2 based encoders.

streamfeature="stream"

Types which operate over Stream<Item = io::Result<Bytes>> streams, both encoders and decoders for various formats.

writefeature="write"

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