Skip to content

Zettroke/zip-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Streaming zip writer

fn main() {
    let mut writer = ZipWriter::new(Vec::new());

    writer.append_data("test_file", b"basically very smol file").unwrap();

    let _out = writer.finish().unwrap();
}
fn main() {
    let mut writer = ZipWriter::new(Vec::new());

    writer
        .start_file("test_file")
        .modification(std::time::SystemTime::now()) // <- time feature
        .write_all(b"basically very smol file")
        .unwrap();

    let _out = writer.finish().unwrap();
}
fn main() {
    let writer = ZipWriter::new(Cursor::new(Vec::new()));

    let mut file_writer = writer.start_file_writer("test").writer().unwrap();
    file_writer.write_all(data).unwrap();
    
    writer = file_writer.finish().unwrap();
    let _out = writer.finish().unwrap();
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages