ZLIB Inflation C#
Members - Reputation: 487
Posted 08 October 2012 - 09:40 PM
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.
Members - Reputation: 146
Posted 09 October 2012 - 02:48 AM
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.