Current version of compression library include following compression algorithms: LZSS,
Adaptive and Non-Adaptive Prefix Codes and Run Length Encoding algorithm.
JurikSoft Compression Library is a .NET DLL library which is very easy to use.
This .NET component was developed using .NET Framework versions 1.1 and Microsoft Visual Studio .NET 2003.
// Initializes a new instance of the LZSS class with a compression parameters:
// 10 hash chains, use Prefix Codes compression algorithm, not use RLE and
// maximum data block up to 131072 bytes
JurikSoft.Compression.ICompression compressionObj = new JurikSoft.Compression.LZSS(10, true, true, false, 131072);
FileStream fileStream_DataFile = File.Open("test.dat");
byte [] byteArray_DataToCompress = new byte[fileStream_DataFile.Length], byte [] byteArray_CompressedData = null;
fileStream_DataFile.Read(byteArray_DataToCompress, 0, byteArray_DataToCompress.Length);
//Compress the data with adding MD5 hash check sum
byteArray_CompressedData = compressionObj.Compress(byteArray_DataToCompress, true);
fileStream_DataFile.Close();
In the final you has compressed data in byte
array and can write byteArray_CompressedData
array to file if need;