flate2-rs icon indicating copy to clipboard operation
flate2-rs copied to clipboard

DEFLATE, gzip, and zlib bindings for Rust

Results 44 flate2-rs issues
Sort by recently updated
recently updated
newest added
trafficstars

I have no idea how common the `read_to_string()` use case is, but I've been struggling with errors attempt to decompress to a file, and wouldn't mind seeing some examples of...

If I'm parsing a continuous encoded stream that is (unfortunately) divided up across several successive inputs, my only option appears to be using the Decompress object directly, which is a...

question

flate2 creates slices of uninitialized memory in several places. The only two places where it happens when using the Rust backend are [here](https://github.com/alexcrichton/flate2-rs/blob/53e45a68bf47004494ca5c8cf06d197e99aa713e/src/mem.rs#L321) and [here](https://github.com/alexcrichton/flate2-rs/blob/53e45a68bf47004494ca5c8cf06d197e99aa713e/src/mem.rs#L433). This is equivalent to the...

When I pass a 6MiB-buffer it produces an obviously incomplete 60KiB file. It works only when I feed it with smaller chunks (with resulting file of 2MiB).

I'm working on decompressing a heap of zlib compressed streams. Each one has a defined chunk size. The first chunk is always valid, but the second chunk is always invalid....

I am writing an application that needs to read a zlib stream of bytes and it should only succeed once the whole stream of valid bytes is received. Every time...

Hello, I was wondering if there were a specific reason for the `GzDecoder` to not implement `Clone` when the `R` type implements `Clone` too. [It doesn't seem](https://github.com/rust-lang/flate2-rs/blob/31fb07820345691352aaa64f367c1e482ad9cfdc/src/gz/read.rs#L132-L135) to [contain complex](https://github.com/rust-lang/flate2-rs/blob/31fb07820345691352aaa64f367c1e482ad9cfdc/src/gz/bufread.rs#L299-L305)...

The following snippet: ```rust fn main() { use std::io::Write; let buf = Vec::new(); let mut file = flate2::write::ZlibEncoder::new(buf, flate2::Compression::best()); file.write_all(b"Hello world!").unwrap(); file.flush().unwrap(); println!("reported size: {}", file.total_out()); println!("actual size: {}", file.finish().unwrap().len());...

Just moving from a comment (https://github.com/alexcrichton/flate2-rs/pull/230#issuecomment-592104767) to a proper tracking issue: > @RReverser > @alexcrichton Somewhat related. I've noticed that higher-level APIs currently don't expose these advanced zlib configurations, which...

flate2 includes plenty of unsafe code that's only used for interaction C backends, and can be omitted from the Rust backend builds. We should use conditional compilation to leave it...