jibsen / blz4

Example of LZ4 compression with optimal parsing using BriefLZ algorithms
zlib License
27 stars 2 forks source link

tiny decompress buffer #2

Open kimstik opened 1 year ago

kimstik commented 1 year ago

I'm looking for optimal compression with limited resources to decompress. In my case it is 16k available RAM. LZ4x of Ilya Muravyov is easily tweakable for that case. I couldn't figure out how to do it correctly for blz4 ;(

jibsen commented 1 year ago

If you mean limiting the block size, there is the BLOCK_SIZE define.

kimstik commented 1 year ago

I'm looking for how to reduce the back-reference window size on decoder size. LZ4 block format require 64k one. BLOCK_SIZE seems to be more related to framing - max block size inside of frame (8M)

kimstik commented 1 year ago

:) got it. thanks! if (pos == NO_MATCH_POS || cur - pos > 65535 || num_chain-- == 0) {

jibsen commented 1 year ago

Ah, I see -- glad you found it!