Skip to content

Instantly share code, notes, and snippets.

@Yasushi
Created November 9, 2017 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yasushi/89bdddf0c4bf99c1e8b99031e7855990 to your computer and use it in GitHub Desktop.
Save Yasushi/89bdddf0c4bf99c1e8b99031e7855990 to your computer and use it in GitHub Desktop.
extern crate zip;
use zip::write::FileOptions;
fn main() {
let path = std::path::Path::new("dummy.zip");
let file = std::fs::File::create(&path).unwrap();
let mut zip = zip::ZipWriter::new(file);
for i in 3..259 {
let pad = "x".repeat(i - 3);
let name = format!("{:03}{}", i, pad);
zip.start_file(name, FileOptions::default()).unwrap();
}
zip.finish().unwrap();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment