Class RawDeflate
Provides raw DEFLATE compression and decompression utilities.
public static class RawDeflate
- Inheritance
-
RawDeflate
- Inherited Members
Methods
Compress(byte[])
Compresses data using raw DEFLATE, stripping any Zlib header/trailer.
Uses the vendored zlib 1.3.1 C# port with chdman's exact parameters — byte-for-byte
identical to chdman -c zlib (verified 562/562 hunks vs chdman).
public static byte[]? Compress(byte[] data)
Parameters
databyte[]The uncompressed input data.
Returns
- byte[]
The compressed bytes, or
nullif compression did not reduce size.
Decompress(byte[], int)
Decompresses raw DEFLATE data to the specified original size.
public static byte[] Decompress(byte[] compressed, int originalSize)
Parameters
compressedbyte[]The compressed input data.
originalSizeintThe expected number of uncompressed bytes.
Returns
- byte[]
The decompressed byte array.