shoop icon indicating copy to clipboard operation
shoop copied to clipboard

add compression

Open mcginty opened this issue 9 years ago • 3 comments

Snappy or LZ4 comes to mind: https://github.com/BurntSushi/rust-snappy, https://github.com/bozaro/lz4-rs

mcginty avatar Aug 03 '16 18:08 mcginty

Ideal would be something that can compress the stream in multiple threads to achieve highest throughput. This could be tested for both libraries though.

lunemec avatar Aug 03 '16 19:08 lunemec

Note that the best compressor to use depends on the particular combination of compression speed, bandwidth, and decompression speed. Single-threaded zlib is better than LZ4 at <~5MB/s, ZSTD is the best at <32MB/s (but doesn't have a pure-rust implementation), etc.

Some more details and theory here: http://fastcompression.blogspot.com/2015/01/zstd-stronger-compression-algorithm.html

rmmh avatar Aug 06 '16 06:08 rmmh

The crypto is currently not much of a bottleneck, so I think it's also wondering how much we want to burn the laps of our users :).

mcginty avatar Aug 08 '16 12:08 mcginty