Skip Menu |

This queue is for tickets about the Compress-LZ4 CPAN distribution.

Report information
The Basics
Id: 90451
Status: resolved
Priority: 0/
Queue: Compress-LZ4

People
Owner: Nobody in particular
Requestors: smueller [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Compress::LZ4 length header
Date: Sun, 17 Nov 2013 15:22:19 +0100
To: bug-Compress-LZ4 [...] rt.cpan.org
From: Steffen Mueller <smueller [...] cpan.org>
Hi, thanks for the Compress::LZ4 module. I'm using it for Sereal's pure-Perl unpacker/debugger[1] Initially, when I added LZ4 functionality, Compress::LZ4 was unable to decompress the compressed packets I generated from C. It turns out that it's because Compress::LZ4 prefixes the actual data with a length encoded as a big-endian 32-bit integer. I can see why it would do that, but given that it doesn't even document that fact, it's no longer compatible with any other LZ4 implementation. It would be fantastic if you could please either: a) Document that it does this. b) Maybe provide additional compress/decompress functions that either take explicit lengths as parameters or rely on the input string length. Thanks and best regards, Steffen [1] https://github.com/Sereal/Sereal/commit/ad3b5f315287cbf7a3eab6d165dcb44d35539930
On Sun Nov 17 09:22:33 2013, SMUELLER wrote: Show quoted text
> Hi, > > thanks for the Compress::LZ4 module. I'm using it for Sereal's pure- > Perl > unpacker/debugger[1] > > Initially, when I added LZ4 functionality, Compress::LZ4 was unable to > decompress the compressed packets I generated from C. It turns out > that > it's because Compress::LZ4 prefixes the actual data with a length > encoded as a big-endian 32-bit integer. I can see why it would do > that, > but given that it doesn't even document that fact, it's no longer > compatible with any other LZ4 implementation. > > It would be fantastic if you could please either: > > a) Document that it does this. > > b) Maybe provide additional compress/decompress functions that either > take explicit lengths as parameters or rely on the input string > length. > > Thanks and best regards, > Steffen > > [1] > https://github.com/Sereal/Sereal/commit/ad3b5f315287cbf7a3eab6d165dcb44d35539930
0.18 should resolve this