Registry / async / async-compression

async-compression

JSON →
library0.4.42rscratesunverified

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

# Cargo.toml [dependencies] async-compression = "0.4.42"
INSTALL
IMPORT
SIG · ASYNC-COMPRESSION
A
async-compression
asyncrustv0.4.42
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GzipDecoder
use async_compression::tokio::bufread::GzipDecoder;

Decompress a gzip file asynchronously

use async_compression::tokio::bufread::GzipDecoder; use tokio::io::AsyncReadExt; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let file = tokio::fs::File::open("file.gz").await?; let reader = tokio::io::BufReader::new(file); let mut decoder = GzipDecoder::new(reader); let mut contents = String::new(); decoder.read_to_string(&mut contents).await?; println!("{}", contents); Ok(()) }
Debug
Known issues
gotchaRequires a feature flag for the async runtime (e.g., tokio, async-std).
fix
Add `features = ["tokio"]` to async-compression dependency in Cargo.toml.
affects: >=0.0.0
Upgrade
Version history
0.4.42latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
53 hits · last 30 days
node
46
OpenAI (training)
1
Resources
async-compression — cargo add async-compression · libregistry