DotNetCompression

DotNetCompression Samples

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.

            
01
02
03
04
05
06
07
08
09
10
using 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.

Samples

In-memory compression using CompressionFactory

Demonstrates how to use the CompressionFactory to compress arrays of bytes using all available compression methods by alternating between them during runtime.

Download

Streamed compression using CompressionFactory

Demonstrates how to use the CompressionFactory to compress streams using all available compression methods by alternating between them during runtime.

Download

Using GZipStream

Demonstrates how to use compression streams without the CompressionFactory. Uses GZipStream to compress data into a file.

Download

Using Lzf4OutputStream and Lzf4InputStream

Demonstrates how to use compression streams without the CompressionFactory. Uses Lzf4OutputStream and Lzf4InputStream streams.

Download

Get started today.

Download Now