I wanted to add full compression support to Rust. Full support means stream compression (good for http compression) and multiple call compression (compressing large file with multiple batches of read). To get to that point, the miniz.cpp and deflate API in Rust runtime need to be enhanced to overcome a few limitations.
I've worked with the author of miniz.c (Rich Geldreich) to merge changes into miniz.c on his codeline for the needed API for Rust, and resolved the decompression bug in miniz's code when working with gzip'ed file. http://code.google.com/p/miniz/issues/detail?id=25&can=1 http://code.google.com/p/miniz/issues/detail?id=23&can=1 I've implemented a full set of deflate API in Rust to support stream compression and multiple call compression, with caller-driven and callee-driven pipe style API. Also I've written the Rust GZip library with stream support like GZipReader and GZipWriter. For testing, I've re-implemented most of the gzip command line program on top of the Rust GZip library. Some performance data for the interested: Rust compression is about 1.8 times slower, decompression is about 3 times slower than gzip. Overall it seems solid. See https://github.com/williamw520/rustyzipfor the source. Now I need help to merge the changes into the Rust master codeline. There are couple things. 1. What license to assign for the new files? I use MPL currently. 2. There's a new version of miniz.cpp needed for things to work. Is the Rust runtime still open for C++ file changes? 3. There are two new files for the deflate library (deflate.rs) and the gzip library (gzip.rs). Which Rust runtime library is the appropriate one to put them in? 4. Should the command line tool rgzip stay in an outside codeline or be merged into the Rust runtime? If merging in, where is a good place for tools? Thanks William
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
