Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


ZLIB Inflation C#


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Quat   Members   -  Reputation: 414

Like
0Likes
Like

Posted 08 October 2012 - 09:40 PM

Hi,

I am tasked with reading a binary file. The documentation of the file format indicates that segments of the file may have ZLIB compression applied. For the parts that are not compressed, I am using BinaryReader which works fine. Basically, I want something ZLibBinaryReader that I can use to inflate the compressed data, but using API like ReadInt32, ReadSingle, etc.

Can anyone recommend a free open source library like this? I do not need to open entire compressed files, but I will have offset in file stream to start of compressed data, and want to start inflating the compressed data for some byteLength.
-----Quat

Sponsor:

#2 YellowSnow   Members   -  Reputation: 146

Like
0Likes
Like

Posted 09 October 2012 - 02:48 AM

Since .NET 2.0 the framework comes with a class that you can use for this task: http://msdn.microsof...m(v=vs.80).aspx

Note however, that the stream written by zlib contains a header and a trailing checksum. DeflateStream only decompresses the raw data.
For more details see here: http://tlzprgmr.word...-compatibility/

Edited by YellowSnow, 09 October 2012 - 02:48 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS