Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"10-02-12 - Small note on LZHAM"

6 Comments -

1 – 6 of 6
Blogger   said...

Can't LZMA2 do multi-threaded encode/decode?

October 2, 2012 at 5:41 PM

Blogger   said...

ah, so can LZHAM. I'd be interested to see which is better multi-threaded. I expect the same improvement, but the implementations might differ.

October 2, 2012 at 5:45 PM

Blogger cbloom said...

Neither one can multi-thread decode, which is what I am timing. Both can multi-thread encode in different ways.

October 2, 2012 at 6:11 PM

Blogger Rich Geldreich said...

Thanks for trying out LZHAM. This is a very interesting way of testing codecs. The current decompressor suffers from having to clear too many Huffman context tables at startup. I need to optimize this (maybe add a lazy clearing scheme that only clears those tables that are actually used), and also offer a choice to use less contexts (trading off some compression for faster init).

Also, the latest version of LZHAM (currently only checked into SVN) has faster startup times than the latest downloadable version (I reduced the amount of memory allocation that was ocuring during decompressor init). I need to get off my butt and release it.

October 2, 2012 at 6:12 PM

Blogger cbloom said...

BTW an obvious way to multi-thread an LZ77 decoder (without just chunking, which costs compression) would be have one thread doing all the code stream unpacking and another thread read the unpacked code stream and write out the match copies and literals to the output buffer. Should provide some speedup. Not really a great way to use your CPU though.

October 2, 2012 at 6:13 PM

Blogger cbloom said...

@Rich - Yeah, LZHAM does worst on really small files (16k or less). Obviously one option for a user is just to drop down to a simpler compressor (eg. zip) on tiny buffers.

Also the Huffman fast decode tables should use fewer peek bits on small files.

October 2, 2012 at 6:20 PM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.