A library for creating zip files using rayon for thread control
This library is inspired by mtzip, which manages concurrency by itself.
Example usage:
```rs use rayon::ThreadPoolBuilder; use rayonzip::ZipArchive;
// Get amount of available threads for use let threads = std::threads::available_parallelism.unwrap();
// Build a rayon thread pool let threadpool = ThreadPoolBuilder::new().numthread(threads.into()).build().unwrap();
// Create a zp archive that'll use the thread pool to compress concurrently let mut zipper = ZipArchive::new(&thread_pool);
// Add a file from filesystem zipper.addfilefromfs("input/testtextfile.txt", "testtext_file.txt");
// Add a file from binary slice zipper.addfilefromslice(b"Hello, world!", "helloworld.txt");
// Adding a directory and a file to it zipper.adddirectory("testdir"); zipper.addfile("input/filethatgoestoadir.txt", "testdir/filethatgoestoadir.txt");
// Writing to a file
// First, open/create a file let mut file = File::create("output.zip").unwrap(); // Now, write the zip archive data to a file. // This consumes the zip archive struct. Write to a buffer if you want to write to multiple destinations zipper.write(&mut file).unwrap(); ```