ning / compress

High-performance, streaming/chunking Java LZF codec, compatible with standard C LZF package
Other
254 stars 40 forks source link

Fix VanillaChunkEncoder.tryCompress to use inPos for the initialization of seen bytes. #39

Closed rjernst closed 10 years ago

rjernst commented 10 years ago

By always initializing seen to to the beginning of the buffer, instead of using the given offset, the reuse of the hash table can, in rare cases, cause data corruption. See the provided test case for more details.

cowtowncoder commented 10 years ago

Thanks for reporting this & providing fix.