Created
November 9, 2017 13:41
-
-
Save Yasushi/89bdddf0c4bf99c1e8b99031e7855990 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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