Skip Menu |

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

Report information
The Basics
Id: 40916
Status: resolved
Priority: 0/
Queue: IO-Compress-Zlib

People
Owner: Nobody in particular
Requestors: felix.ostmann [...] thewar.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.000_09
Fixed in: (no value)



Subject: Unknown first 2 bytes
The new Dchk from DeNIC send responses with RFC 1951 compressed data and a java and c client works very well, using there compression modules. Using this modul to inflate the response wont work properly. the first two bytes are always the same and need to be cut, after that this modul works very well. the 16 bits are: 0111100010011100 after reading RFC 1951 i dont understand this bits :-/
From: felix.ostmann [...] thewar.de
On Fr. 14. Nov. 2008, 04:13:37, Sadrak wrote: Show quoted text
> The new Dchk from DeNIC send responses with RFC 1951 compressed data and > a java and c client works very well, using there compression modules. > Using this modul to inflate the response wont work properly. the first > two bytes are always the same and need to be cut, after that this modul > works very well. > > the 16 bits are: 0111100010011100 > > after reading RFC 1951 i dont understand this bits :-/
here a short example file + testscript: perl -MIO::Uncompress::RawInflate=rawinflate -e '$/=undef;$c1=<>;substr($c1,0,2,"");rawinflate(\$c1,\my $c2);print $c2;' < payload.rfc1951 without the substr there will be no error, but $c1 eq $c2
Download payload.rfc1951
application/octet-stream 457b

Message body not shown because it is not plain text.

From: felix.ostmann [...] thewar.de
On Fr. 14. Nov. 2008, 04:28:33, Sadrak wrote: Show quoted text
> On Fr. 14. Nov. 2008, 04:13:37, Sadrak wrote:
> > The new Dchk from DeNIC send responses with RFC 1951 compressed data and > > a java and c client works very well, using there compression modules. > > Using this modul to inflate the response wont work properly. the first > > two bytes are always the same and need to be cut, after that this modul > > works very well. > > > > the 16 bits are: 0111100010011100 > > > > after reading RFC 1951 i dont understand this bits :-/
> > here a short example file + testscript: > > perl -MIO::Uncompress::RawInflate=rawinflate -e > '$/=undef;$c1=<>;substr($c1,0,2,"");rawinflate(\$c1,\my $c2);print $c2;' > < payload.rfc1951 > > without the substr there will be no error, but $c1 eq $c2
one more hint: here are the C client: http://dchk.pfp.de/
Hi Felix, The data file you sent is an RFC1950 compliant data stream - which is just an RFC1950 data stream with a two byte header and a 4 byte CRC footer. That's why your code worked when you removed the two byte header. Use IO::Uncompress::Inflate, rather than IO::Uncompress::RawInflate to uncompress it without having to mess with substr. If that doesn't work, get back to me. thanks for providing a test file & a script to illustrate the problem - it really helped me to track down your issue. Paul
Subject: Re: [rt.cpan.org #40916] Unknown first 2 bytes
Date: Fri, 14 Nov 2008 14:58:16 +0100
To: bug-IO-Compress-Zlib [...] rt.cpan.org
From: Felix Antonius Wilhelm Ostmann <felix.ostmann [...] thewar.de>
that is ... uh, insane :-/ i tested every IO::Uncompress, nothing worked, AnyInflate too. Now it works ... hell :-/ perhaps a mistake in my testscript. Thanks a lot! Paul Marquess via RT schrieb: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=40916 > > > Hi Felix, > > The data file you sent is an RFC1950 compliant data stream - which is > just an RFC1950 data stream with a two byte header and a 4 byte CRC > footer. That's why your code worked when you removed the two byte > header. Use IO::Uncompress::Inflate, rather than > IO::Uncompress::RawInflate to uncompress it without having to mess with > substr. If that doesn't work, get back to me. > > thanks for providing a test file & a script to illustrate the problem - > it really helped me to track down your issue. > > Paul >
-- Reserve your abuse for your true friends. -- Larry Wall in <199712041852.KAA19364@wall.org>
Subject: Re: [rt.cpan.org #40916] Unknown first 2 bytes
Date: Fri, 14 Nov 2008 15:03:32 +0100
To: bug-IO-Compress-Zlib [...] rt.cpan.org
From: Felix Antonius Wilhelm Ostmann <felix.ostmann [...] thewar.de>
Paul Marquess via RT schrieb: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=40916 > > > Hi Felix, > > The data file you sent is an RFC1950 compliant data stream - which is > just an RFC1950 data stream with a two byte header and a 4 byte CRC > footer. That's why your code worked when you removed the two byte > header. Use IO::Uncompress::Inflate, rather than > IO::Uncompress::RawInflate to uncompress it without having to mess with > substr. If that doesn't work, get back to me. > > thanks for providing a test file & a script to illustrate the problem - > it really helped me to track down your issue. > > Paul >
-- Reserve your abuse for your true friends. -- Larry Wall in <199712041852.KAA19364@wall.org>
Subject: Re: [rt.cpan.org #40916] Unknown first 2 bytes
Date: Fri, 14 Nov 2008 15:04:52 +0100
To: bug-IO-Compress-Zlib [...] rt.cpan.org
From: Felix Antonius Wilhelm Ostmann <felix.ostmann [...] thewar.de>
OK, one more questions: Is that really RFC 1950 and perhaps RFC 1951? the official API from DeNIC told me, that they use RFC 1951. Paul Marquess via RT schrieb: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=40916 > > > Hi Felix, > > The data file you sent is an RFC1950 compliant data stream - which is > just an RFC1950 data stream with a two byte header and a 4 byte CRC > footer. That's why your code worked when you removed the two byte > header. Use IO::Uncompress::Inflate, rather than > IO::Uncompress::RawInflate to uncompress it without having to mess with > substr. If that doesn't work, get back to me. > > thanks for providing a test file & a script to illustrate the problem - > it really helped me to track down your issue. > > Paul >
-- Reserve your abuse for your true friends. -- Larry Wall in <199712041852.KAA19364@wall.org>
On Fri Nov 14 09:04:46 2008, Sadrak wrote: Show quoted text
> OK, one more questions: Is that really RFC 1950 and perhaps RFC 1951? > the official API from DeNIC told me, that they use RFC 1951.
Sort of. You could argue that an RFC1951 stream contains an RFC1950 stream, so in effect it is both. From in interface perspective though it is RFC1951. You had to jump through hoops (by removing the first two bytes) to get it uncompressed, so the interface definition is incorrect. Paul