Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
10
third-party/vendor/flate2/examples/zlibencoder-write.rs
vendored
Normal file
10
third-party/vendor/flate2/examples/zlibencoder-write.rs
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
use flate2::write::ZlibEncoder;
|
||||
use flate2::Compression;
|
||||
use std::io::prelude::*;
|
||||
|
||||
// Vec<u8> implements Write to print the compressed bytes of sample string
|
||||
fn main() {
|
||||
let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
|
||||
e.write_all(b"Hello World").unwrap();
|
||||
println!("{:?}", e.finish().unwrap());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue