C# Class LZ4Sharp.LZ4Compressor32

Class for compressing a byte array into an LZ4 byte array.
Inheritance: ILZ4Compressor
Mostrar archivo Open project: stangelandcl/LZ4Sharp

Public Methods

Method Description
CalculateMaxCompressedLength ( int uncompressedLength ) : int

Calculate the max compressed byte[] size given the size of the uncompressed byte[]

Compress ( byte source ) : byte[]
Compress ( byte source, byte dest ) : int

Compress source into dest returning compressed length

Compress ( byte source, int srcOffset, int count, byte dest, int dstOffset ) : int

Compress source into dest returning compressed length

LZ4Compressor32 ( ) : System

Private Methods

Method Description
Clear ( byte ptr, int count ) : void

TODO: test if this is faster or slower than Array.Clear.

Compress ( byte source, byte dest, int isize, int maxOutputSize ) : int
Compress64K ( byte source, byte dest, int isize, int maxOutputSize ) : int

Method Details

CalculateMaxCompressedLength() public method

Calculate the max compressed byte[] size given the size of the uncompressed byte[]
public CalculateMaxCompressedLength ( int uncompressedLength ) : int
uncompressedLength int Length of the uncompressed data
return int

Compress() public method

public Compress ( byte source ) : byte[]
source byte
return byte[]

Compress() public method

Compress source into dest returning compressed length
public Compress ( byte source, byte dest ) : int
source byte uncompressed data
dest byte array into which source will be compressed
return int

Compress() public method

Compress source into dest returning compressed length
public Compress ( byte source, int srcOffset, int count, byte dest, int dstOffset ) : int
source byte uncompressed data
srcOffset int offset in source array where reading will start
count int count of bytes in source array to compress
dest byte array into which source will be compressed
dstOffset int start index in dest array where writing will start
return int

LZ4Compressor32() public method

public LZ4Compressor32 ( ) : System
return System