READY-TO-RUN PROJECTS WITH SAMPLE CODE
The DotNetCompression API is based on the CompressionFactory class which exposes all compression formats and provides all the methods and properties required to compress and decompress data.
01020304050607080910using
Noemax.Compression;
CompressionFactory.Deflate.Compress(data, 3);
...
using
(
var
output = CompressionFactory.Deflate.CreateOutputStream(File.Create(
"compressed.zlib"
), 3,
false
))
{
output.Write(data, 0, data.Length);
}
The following samples demonstrate how to switch compression methods dynamically during runtime and how to perform buffered or streamed processing of data.
Demonstrates how to use the CompressionFactory to compress arrays of bytes using all available compression methods by alternating between them during runtime.
DownloadDemonstrates how to use the CompressionFactory to compress streams using all available compression methods by alternating between them during runtime.
DownloadDemonstrates how to use compression streams without the CompressionFactory. Uses GZipStream to compress data into a file.
DownloadDemonstrates how to use compression streams without the CompressionFactory. Uses Lzf4OutputStream and Lzf4InputStream streams.
Download