Lines Matching refs:zip

113     fn new_file(zip_index: ZipIndex, mode: u32, zip_file: &zip::read::ZipFile) -> InodeData {  in new_file()
178 archive: &mut zip::ZipArchive<R>, in from_zip()
253 use zip::write::FileOptions;
256 fn setup(add: fn(&mut zip::ZipWriter<&mut std::io::Cursor<Vec<u8>>>)) -> InodeTable { in setup()
258 let mut writer = zip::ZipWriter::new(&mut buf); in setup()
263 let zip = zip::ZipArchive::new(buf); in setup() localVariable
264 assert!(zip.is_ok()); in setup()
265 let it = InodeTable::from_zip(&mut zip.unwrap()); in setup()
305 let it = setup(|zip| { in one_file()
306 zip.start_file("foo", FileOptions::default()).unwrap(); in one_file()
307 zip.write_all(b"0123456789").unwrap(); in one_file()
315 let it = setup(|zip| { in one_dir()
316 zip.add_directory("foo", FileOptions::default()).unwrap(); in one_dir()
325 let it = setup(|zip| { in one_file_in_subdirs()
326 zip.start_file("a/b/c/d", FileOptions::default()).unwrap(); in one_file_in_subdirs()
327 zip.write_all(b"0123456789").unwrap(); in one_file_in_subdirs()
356 let it = setup(|zip| { in complex_hierarchy()
358 zip.add_directory("a/b1", opt).unwrap(); in complex_hierarchy()
360 zip.start_file("a/b2/c1", opt).unwrap(); in complex_hierarchy()
362 zip.start_file("a/b2/c2/d1", opt).unwrap(); in complex_hierarchy()
363 zip.start_file("a/b2/c2/d2", opt).unwrap(); in complex_hierarchy()
364 zip.start_file("a/b2/c2/d3", opt).unwrap(); in complex_hierarchy()
366 zip.start_file("x/y1", opt).unwrap(); in complex_hierarchy()
367 zip.start_file("x/y2", opt).unwrap(); in complex_hierarchy()
368 zip.add_directory("x/y3", opt).unwrap(); in complex_hierarchy()
370 zip.start_file("foo", opt).unwrap(); in complex_hierarchy()
371 zip.start_file("bar", opt).unwrap(); in complex_hierarchy()
396 let it = setup(|zip| { in file_size()
398 zip.start_file("empty", opt).unwrap(); in file_size()
400 zip.start_file("10bytes", opt).unwrap(); in file_size()
401 zip.write_all(&[0; 10]).unwrap(); in file_size()
403 zip.start_file("1234bytes", opt).unwrap(); in file_size()
404 zip.write_all(&[0; 1234]).unwrap(); in file_size()
406 zip.start_file("2^20bytes", opt).unwrap(); in file_size()
407 zip.write_all(&[0; 2 << 20]).unwrap(); in file_size()
433 let mut writer = zip::ZipWriter::new(&mut buf); in rejects_invalid_paths()
438 let zip = zip::ZipArchive::new(buf); in rejects_invalid_paths() localVariable
439 assert!(zip.is_ok()); in rejects_invalid_paths()
440 let it = InodeTable::from_zip(&mut zip.unwrap()); in rejects_invalid_paths()