use snap; use std::io; fn main() { let stdin = io::stdin(); let stdout = io::stdout(); let mut rdr = stdin.lock(); // Wrap the stdout writer in a Snappy writer. let mut wtr = snap::write::FrameEncoder::new(stdout.lock()); io::copy(&mut rdr, &mut wtr).expect("I/O operation failed"); }