pradeep250677 / lz4

Automatically exported from code.google.com/p/lz4
0 stars 0 forks source link

LZ4 HC doesn't support match references that are exactly 65535 bytes backwards #46

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi Yann,

If you give LZ4 HC a sequence such as

[1, 2, 3, 4, 5, 6, [...65530 incompressible bytes...], 1, 2, 3, 4, 5, 6, [other 
bytes]]

LZ4 HC won't be able to compress it because it always cheks ref > 
ip-MAX_DISTANCE instead of ref >= ip-MAX_DISTANCE (see attached patch for more 
details).

Thank you!

Original issue reported on code.google.com by jpou...@gmail.com on 29 Nov 2012 at 10:58

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks Adrien. Clear and simple. I'll update it.

Original comment by yann.col...@gmail.com on 30 Nov 2012 at 10:45

GoogleCodeExporter commented 8 years ago
Thanks, Yann!

Original comment by jpou...@gmail.com on 30 Nov 2012 at 10:47

GoogleCodeExporter commented 8 years ago
The RC version in attached file integrates your proposed correction regarding 
extended LZ4 HC detection window.

Original comment by yann.col...@gmail.com on 30 Nov 2012 at 12:50

Attachments:

GoogleCodeExporter commented 8 years ago
Looks good. For what it's worth, all my Java tests pass with this RC.

Original comment by jpou...@gmail.com on 30 Nov 2012 at 1:05

GoogleCodeExporter commented 8 years ago
Corrected into r84.

Original comment by yann.col...@gmail.com on 30 Nov 2012 at 1:25