1fn doit() -> zip::result::ZipResult<()> 2{ 3 use std::io::Write; 4 5 // For this example we write to a buffer, but normally you should use a File 6 let mut buf: &mut [u8] = &mut [0u8; 65536]; 7 let mut w = std::io::Cursor::new(buf); 8 let mut zip = zip::ZipWriter::new(w); 9 10 let options = zip::write::FileOptions::default().compression_method(zip::CompressionMethod::Stored); 11 zip.start_file("h
![Rustでzipファイルを作成したい](https://cdn-ak-scissors.b.st-hatena.com/image/square/d61d99447f3434c475f38686e3fcb4f6ab93528f/height=288;version=1;width=512/https%3A%2F%2Fteratail.com%2Fimg%2FogpImages%2FimgFacebookShare.png)