dyz1990 / sevenz-rust

A 7z decompressor/compressor lib written in pure rust
Apache License 2.0
146 stars 24 forks source link

Performance #27

Open T3kla opened 1 year ago

T3kla commented 1 year ago

I have been testing performance against the default 7zFM and it is much faster than this lib. I haven't look much into it but this seems like the program is multithreaded while this lib reads file by file. I'm gonna make my best effort to make it multithreaded but if there is known way of doing it please let me know!

dyz1990 commented 11 months ago

This library does not currently support multi-threaded codecs, it may in the future

T3kla commented 11 months ago

Due to my app specifications I had to swap to the 7z CLI app to make the decompression run faster, loosing the progress bar in the process. I did try to make changes to the library to make it multi-threaded but my current knowledge of Rust just isn't enough at this point :c

dyz1990 commented 11 months ago

Well, I think the best way is to support lzma2 multi-threaded codec, just like the fast-lzma2 library, but it is very difficult to implement. But there is a simple way that works for non-solid compressed 7z files. You can check examples/mt_decompress.rs in the mt_decompress branch

About solid compressoin: https://en.wikipedia.org/wiki/Solid_compression

T3kla commented 11 months ago

Wow that is really helpful, I'll give it a try!