#async-io #adaptor #modern

async-compression

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

59 releases

0.4.32 Sep 26, 2025
0.4.30 Aug 31, 2025
0.4.27 Jul 13, 2025
0.4.22 Mar 25, 2025
0.1.0-alpha.1 May 14, 2019

#8 in Compression

Download history 1634635/week @ 2025-07-14 1336506/week @ 2025-07-21 1278645/week @ 2025-07-28 1431472/week @ 2025-08-04 1621491/week @ 2025-08-11 1288117/week @ 2025-08-18 1311293/week @ 2025-08-25 1323903/week @ 2025-09-01 1528313/week @ 2025-09-08 1325674/week @ 2025-09-15 1335071/week @ 2025-09-22 1397353/week @ 2025-09-29 1404673/week @ 2025-10-06 1403669/week @ 2025-10-13 1463981/week @ 2025-10-20 1495100/week @ 2025-10-27

5,844,390 downloads per month
Used in 2,824 crates (225 directly)

MIT/Apache

250KB
6K SLoC

async-compression

crates.io version build status downloads docs.rs docs MIT or Apache 2.0 licensed dependency status

This crate provides adaptors between compression crates and Rust's modern asynchronous IO types.

Development

When developing you will need to enable appropriate features for the different test cases to run, the simplest is cargo test --all-features, but you can enable different subsets of features as appropriate for the code you are testing to avoid compiling all dependencies, e.g. cargo test --features tokio,gzip.

To prepare for a pull request, you can run several other checks:

  1. fmt

    cargo fmt --all
    cargo clippy --no-deps
    
  2. build

    cargo build --lib --all-features
    
  3. nextest

    cargo --locked nextest run --workspace --all-features
    
  4. hack check

    cargo hack check --workspace --feature-powerset --all-targets --skip 'all,all-algorithms,all-implementations'
    
  5. wasm32 - Linux only

    gh release download --repo WebAssembly/wasi-sdk --pattern 'wasi-sysroot-*.tar.gz'
    mkdir -p wasi-sysroot
    tar xf wasi-sysroot-*.tar.gz --strip-components=1 -C wasi-sysroot
    
    rustup target add wasm32-wasip1-threads
    
    export "CFLAGS_wasm32_wasip1_threads=--sysroot=\"${PWD}/wasi-sysroot\" -I\"${PWD}/wasi-sysroot/include/wasm32-wasip1-threads\" -L-I\"${PWD}/wasi-sysroot/lib/wasm32-wasip1-threads\""
    cargo build --lib --features all-implementations,brotli,bzip2,deflate,gzip,lz4,lzma,xz,zlib,zstd,deflate64 --target wasm32-wasip1-threads
    

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0–6MB
~143K SLoC