I am already not sure about the reading of the data from the network for binary data - I have used recv sofar only with text - does recv also work for binary data?

According to docs, if you didn't set anything special on socket with binmode(), it will receive bytes.

I don't know if it is important, but do all the message fit in 1024 bytes?

I'd also check compression/decompression starting with a simpler test: take a string, compress it, then decompress it and see if you received the original data back again. If it's fine, then try the same method on the socket.

You may also try with other modules, like IO::Uncompress::Gunzip.

In reply to Re: Reading a GZIP network stream by przemo
in thread Reading a GZIP network stream by weismat

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":