Closed jin-x closed 4 years ago
Good catch, thank you!
I think I added the 512 offset as I was finalizing the format (it is nearly free even on 8 bit CPUs since it's a substraction of 2 from the high byte, and allows for a greater coding range since smaller offsets use different and shorter encodings). I never updated the spec.
Good remark on the version identifier as well, I also corrected it.
Thanks again!
Good for 512 👍 But there's no bit 0 in Header format description. I see only "7 6 5 4 3 2 1", without "0".
There's an error in description of 13-bit match in BlockFormat_LZSA2.md You write:
But you don't mention subtracting 512 from resulting value.
When creating my own unpacking code, I couldn't understand the reason of error. And found this value of 512 only in your sources.
And one more note about stream format (StreamFormat.md)
You write:
Where is zero bit ? Your packer writes 20h into traits byte for LZSA2 and 0 for LZSA1. So it's must be four V bits (if V = 2 means LZSA2). Or five Z bits (but V = 1 means LZSA2 in that case, not V = 2).