fn sample_builder() -> Result<(), io::Error> {
let f = File::create("examples/hello_world.gz")?;
let mut gz = GzBuilder::new()
- .filename("hello_world.txt")
- .comment("test file, please delete")
- .write(f, Compression::default());
- gz.write(b"hello world")?;
+ .filename("hello_world.txt")
+ .comment("test file, please delete")
+ .write(f, Compression::default());
+ gz.write_all(b"hello world")?;
gz.finish()?;
Ok(())
}