Docs.rs
  • async-compression-0.4.23
    • async-compression 0.4.23
    • Permalink
    • Docs.rs crate page
    • MIT OR Apache-2.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • Nemo157
    • yoshuawuyts
    • robjtede
    • NobodyXu
    • Dependencies
      • brotli ^8.0 normal optional
      • bzip2 ^0.5.0 normal optional
      • deflate64 ^0.1.5 normal optional
      • flate2 ^1.0.13 normal optional
      • futures-core ^0.3 normal
      • futures-io ^0.3 normal optional
      • liblzma ^0.4.0 normal optional
      • zstd ^0.13.1 normal optional
      • lz4 ^1.28.1 normal optional
      • memchr ^2 normal
      • pin-project-lite ^0.2 normal
      • tokio ^1.24.2 normal optional
      • zstd-safe ^7 normal optional
      • bytes ^1 dev
      • futures ^0.3.5 dev
      • futures-test ^0.3.5 dev
      • ntest ^0.9 dev
      • proptest ^1 dev
      • proptest-derive ^0.5 dev
      • rand ^0.9.0 dev
      • tokio ^1.24.2 dev
      • tokio-util ^0.7 dev
    • Versions
    • 100% of the crate is documented
  • Platform
    • i686-unknown-linux-gnu
    • x86_64-unknown-linux-gnu
  • Feature flags
  • Rust
    • About docs.rs
    • Privacy policy
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate async_compression

async_compression0.4.23

  • All Items

Sections

  • Feature Organization
    • IO implementation
    • Compression algorithm

Crate Items

  • Modules
  • Enums

Crates

  • async_compression

Crate async_compression

Source
Expand description

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 paired with a selection of algorithms
all-algorithmsActivates all algorithms, needs to be paired 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
futures-iofutures::io::AsyncBufRead, futures::io::AsyncWrite
tokiotokio::io::AsyncBufRead, tokio::io::AsyncWrite

§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
bzip2BzEncoder, BzDecoder
deflateDeflateEncoder, DeflateDecoder
gzipGzipEncoder, GzipDecoder
lz4Lz4Encoder, Lz4Decoder
lzmaLzmaEncoder, LzmaDecoder
xzXzEncoder, XzDecoder
zlibZlibEncoder, ZlibDecoder
zstdZstdEncoder, ZstdDecoder
deflate64(encoder not implemented), Deflate64Decoder

Modules§

brotlibrotli
This module contains Brotli-specific types for async-compression.
futuresfutures-io
Implementations for IO traits exported by futures-io.
lz4lz4
This module contains lz4-specific types for async-compression.
tokiotokio
Implementations for IO traits exported by tokio v1.x.
zstdzstd
This module contains zstd-specific types for async-compression.

Enums§

Level
Level of compression data should be compressed with.

Results

Settings
Help
    struct
    async_compression::futures::bufread::XzEncoder
    A xz encoder, or compressor.
    struct
    async_compression::futures::write::XzEncoder
    A xz encoder, or compressor.
    struct
    async_compression::tokio::bufread::XzEncoder
    A xz encoder, or compressor.
    struct
    async_compression::tokio::write::XzEncoder
    A xz encoder, or compressor.
    struct
    async_compression::futures::bufread::BzEncoder
    A bzip2 encoder, or compressor.
    struct
    async_compression::futures::write::BzEncoder
    A bzip2 encoder, or compressor.
    struct
    async_compression::tokio::bufread::BzEncoder
    A bzip2 encoder, or compressor.
    struct
    async_compression::tokio::write::BzEncoder
    A bzip2 encoder, or compressor.
    struct
    async_compression::futures::bufread::XzDecoder
    A xz decoder, or decompressor
    struct
    async_compression::futures::write::XzDecoder
    A xz decoder, or decompressor
    struct
    async_compression::tokio::bufread::XzDecoder
    A xz decoder, or decompressor
    struct
    async_compression::tokio::write::XzDecoder
    A xz decoder, or decompressor
    struct
    async_compression::futures::bufread::Lz4Encoder
    A lz4 encoder, or compressor.
    struct
    async_compression::futures::write::Lz4Encoder
    A lz4 encoder, or compressor.
    struct
    async_compression::tokio::bufread::Lz4Encoder
    A lz4 encoder, or compressor.
    struct
    async_compression::tokio::write::Lz4Encoder
    A lz4 encoder, or compressor.
    method
    async_compression::futures::write::XzEncoder::into_inner
    XzEncoder<W> -> W
    Consumes this encoder returning the underlying writer.
    method
    async_compression::tokio::bufread::XzEncoder::into_inner
    XzEncoder<R> -> R
    Consumes this encoder returning the underlying reader.
    method
    async_compression::tokio::write::XzEncoder::into_inner
    XzEncoder<W> -> W
    Consumes this encoder returning the underlying writer.
    method
    async_compression::futures::bufread::XzEncoder::into_inner
    XzEncoder<R> -> R
    Consumes this encoder returning the underlying reader.
    method
    async_compression::futures::write::XzEncoder::get_ref
    &XzEncoder<W> -> &W
    Acquires a reference to the underlying writer that this …
    method
    async_compression::tokio::bufread::XzEncoder::get_ref
    &XzEncoder<R> -> &R
    Acquires a reference to the underlying reader that this …
    method
    async_compression::tokio::write::XzEncoder::get_ref
    &XzEncoder<W> -> &W
    Acquires a reference to the underlying writer that this …
    method
    async_compression::tokio::bufread::XzEncoder::is_write_vectored
    &XzEncoder<R> -> bool
    method
    async_compression::futures::bufread::XzEncoder::get_ref
    &XzEncoder<R> -> &R
    Acquires a reference to the underlying reader that this …
    method
    async_compression::futures::write::XzEncoder::get_mut
    &mut XzEncoder<W> -> &mut W
    Acquires a mutable reference to the underlying writer that …
    method
    async_compression::tokio::bufread::XzEncoder::get_mut
    &mut XzEncoder<R> -> &mut R
    Acquires a mutable reference to the underlying reader that …
    method
    async_compression::tokio::write::XzEncoder::get_mut
    &mut XzEncoder<W> -> &mut W
    Acquires a mutable reference to the underlying writer that …
    method
    async_compression::futures::bufread::XzEncoder::fmt
    &XzEncoder<R>, &mut Formatter -> Result
    method
    async_compression::futures::write::XzEncoder::fmt
    &XzEncoder<W>, &mut Formatter -> Result
    method
    async_compression::tokio::bufread::XzEncoder::fmt
    &XzEncoder<R>, &mut Formatter -> Result
    method
    async_compression::tokio::write::XzEncoder::fmt
    &XzEncoder<W>, &mut Formatter -> Result
    method
    async_compression::futures::bufread::XzEncoder::get_mut
    &mut XzEncoder<R> -> &mut R
    Acquires a mutable reference to the underlying reader that …
    method
    async_compression::futures::bufread::XzEncoder::new
    R -> XzEncoder<R>
    Creates a new encoder which will read uncompressed data …
    method
    async_compression::futures::write::XzEncoder::new
    W -> XzEncoder<W>
    Creates a new encoder which will take in uncompressed data …
    method
    async_compression::tokio::bufread::XzEncoder::new
    R -> XzEncoder<R>
    Creates a new encoder which will read uncompressed data …
    method
    async_compression::tokio::write::XzEncoder::new
    W -> XzEncoder<W>
    Creates a new encoder which will take in uncompressed data …
    method
    async_compression::futures::bufread::XzEncoder::with_quality
    R, Level -> XzEncoder<R>
    Creates a new encoder which will read uncompressed data …
    method
    async_compression::futures::write::XzEncoder::with_quality
    W, Level -> XzEncoder<W>
    Creates a new encoder which will take in uncompressed data …
    method
    async_compression::tokio::bufread::XzEncoder::with_quality
    R, Level -> XzEncoder<R>
    Creates a new encoder which will read uncompressed data …
    method
    async_compression::tokio::write::XzEncoder::with_quality
    W, Level -> XzEncoder<W>
    Creates a new encoder which will take in uncompressed data …