{"id":57140,"library":"flate2","title":"Flate2","description":"DEFLATE compression and decompression exposed as Read/BufRead/Write streams, supporting zlib, gzip, and raw deflate.","status":"active","version":"1.1.9","language":"rust","source_language":null,"source_url":"https://github.com/rust-lang/flate2-rs","tags":["compression","deflate","gzip","zlib","stream"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nflate2 = \"1.1.9\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add flate2","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"GzDecoder","correct":"use flate2::read::GzDecoder;"}],"quickstart":{"code":"use flate2::read::GzDecoder;\nuse std::io::Read;\n\nfn main() -> std::io::Result<()> {\n    let compressed = vec![31, 139, 8, 0, 0, 0, 0, 0, 0, 3, 243, 72, 205, 201, 201, 87, 8, 207, 47, 202, 73, 81, 4, 0, 162, 240, 82, 179, 12, 0, 0, 0];\n    let mut decoder = GzDecoder::new(&compressed[..]);\n    let mut s = String::new();\n    decoder.read_to_string(&mut s)?;\n    println!(\"{}\", s);\n    Ok(())\n}","lang":"rust","description":"Decompress gzip data using a streaming decoder."},"warnings":[{"fix":"Add `features = [\"zlib\"]` to Cargo.toml and install zlib development files.","message":"Default backend uses `miniz_oxide`; for better performance, enable `zlib` feature with a C library.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'compress':3,16 'decompress':5 'deflat':2,15,17 'expos':6 'flate2':1 'gzip':12,18 'raw':14 'read/bufread/write':8 'stream':9,20 'support':10 'zlib':11,19","created_at":"2026-06-16T15:29:39.628149+00:00","updated_at":"2026-06-16T15:29:39.628149+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/rust-lang/flate2-rs","github":"https://github.com/rust-lang/flate2-rs","docs":"https://docs.rs/flate2/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}