Tags: Elskom/ZlibSharp
Tags
Changes in 1.2.13.4. - Made ZlibStatus public. - Replaced MemoryZlib static class with: - Checks inside of a `Checks` static class. - Compression methods inside of a new ZlibEncoder class.* - Decompression methods inside of a new ZlibDecoder class.* - Added Crc32 and Status members to the ZlibResult structure. * The new ZlibEncoder has new TryCompress methods while the new ZlibDecoder has new TryDecompress methods.
A bug fix to the calculation of the adler32 hash when compressing dat… …a. Also added strong name signing as well. Signed-off-by: AraHaan <[email protected]>
Added gzip support and more control over how compression/decompressio… …n is done based on the input Window Bits. For simplicity reasons, the Window Bits are stored inside of a ZlibWindowBits enum. Added types: - ZlibCompressionStrategy - ZlibWindowBits Added members in MemoryZlib: - IsCompressedByGZip - Note: There is no version of the function for raw deflate streams due to the fact that they lack a header and a footer unline zlib/gzip compressed data. - GetCompressedSize (works with deflate/zlib/gzip compressed data) No more worrying about over or even under allocating the buffers!!! - GetDecompressedSize (works with deflate/zlib/gzip compressed data) No more worrying about over or even under allocating the buffers!!! Changed members in MemoryZlib: - Compress (both versions) adding optional parameters. Please recompile any existing code using these methods as the original would not be found if not recompiled. - Decompress (both versions) adding optional parameters. Please recompile any existing code using these methods as the original would not be found if not recompiled. Internal Changes: - Migrated from deflateInit_/inflateInit_ to deflateInit2_/inflateInit2_ zlib apis due to needing more control over the compressed data. The result: - Performance improvement vs using System.IO.Compression.DeflateStream, System.IO.Compression.ZlibStream, and System.IO.Compression.GZipStream and supports more control over how to compress the data unlike those streams which lack said support.