forked from mirrors/gecko-dev
		
	 a3a60fed58
			
		
	
	
		a3a60fed58
		
	
	
	
	
		
			
			Includes an upgrade to the miniz_oxide crate (not otherwise used) from 0.6.2 to 0.7.1. Differential Revision: https://phabricator.services.mozilla.com/D190837
		
			
				
	
	
		
			10 lines
		
	
	
	
		
			327 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
	
		
			327 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| 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());
 | |
| }
 |