12 releases (6 breaking)

0.7.2 Feb 2, 2023
0.7.0 Jan 27, 2023
0.5.0 Dec 16, 2022
0.3.0 Nov 30, 2022

#156 in Compression

Download history 16/week @ 2022-11-24 63/week @ 2022-12-01 6/week @ 2022-12-08 36/week @ 2022-12-15 3/week @ 2022-12-22 2/week @ 2023-01-05 5/week @ 2023-01-12 1/week @ 2023-01-19 82/week @ 2023-01-26 89/week @ 2023-02-02 26/week @ 2023-02-09 75/week @ 2023-02-16 8/week @ 2023-02-23 6/week @ 2023-03-02 8/week @ 2023-03-09

102 downloads per month
Used in rfmp

MIT license

14KB
269 lines

mtzip

MTZIP (Stand for Multi-Threaded ZIP) is a library for making zip archives utilising all the threads of the machine.

Example usage:

use mtzip::ZipArchive;

// Creating the zipper that holds data and handles compression
let zipper = ZipArchive::default();

// Adding a file from filesystem
zipper.add_file("input/test_text_file.txt", "test_text_file.txt");

// Adding a file from a byte array
zipper.add_file_from_slice(b"Hello, world!", "hello_world.txt");

// Adding a directory and a file to it
zipper.add_directory("test_dir");
// And adding a file to it
zipper.add_file("input/file_that_goes_to_a_dir.txt", "test_dir/file_that_goes_to_a_dir.txt");

// Writing to a file
// First, open the file
let mut file = File::create("output.zip").unwrap();
// Then, write to it
zipper.write(&mut file); // Amount of threads is chosen automatically

Dependencies

~300KB