Method | Description | |
---|---|---|
Compress ( byte data, |
Compresses the byte buffer. This method stores a 8-byte header to store the original and compressed buffer size.
|
|
CompressBytes ( byte data, |
Compresses the byte buffer. This method stores a 8-byte header to store the original and compressed buffer size.
|
|
CompressBytes ( byte data, Lz4Mode mode = Lz4Mode.Fast ) : byte[] |
Compresses the byte buffer. This method stores a 8-byte header to store the original and compressed buffer size.
|
|
CompressString ( string text, Lz4Mode mode = Lz4Mode.Fast ) : string |
Compresses the specified text and return a Base64 enconded string.
|
|
Decompress ( byte data, int offset, byte &buffer ) : int |
Decompresses the byte buffer compressed by a Lz4.CompressBytes or Lz4.Compress method. This method uses the byte array header info to correctly prepare the output buffer.
|
|
DecompressBytes ( byte data ) : byte[] |
Decompresses the byte buffer compressed by a Lz4.CompressBytes or Lz4.Compress method. This method uses the byte array header info to correctly prepare the output buffer.
|
|
DecompressString ( string compressedText ) : string |
Decompresses the specified compressed text by the Lz4.CompressString method.
|
|
GetCompressedSize ( byte data ) : int |
Size of the compressed buffer returned by a Lz4.CompressBytes or Lz4.CompressBytesHC method.
|
|
GetUncompressedSize ( byte data ) : int |
Size of the original (uncompressed) buffer returned by a Lz4.CompressBytes or Lz4.CompressBytesHC method.
|
|
LZ4_compress ( byte source, byte destination, |
Native method call (PInvoke) to the LZ4_compress method. The platform target (X86 or X64) is chosen at runtime. Description: Compresses 'isize' bytes from 'source' into 'dest'. Destination buffer must be already allocated, and must be sized to handle worst cases situations (input data not compressible) Worst case size evaluation is provided by function LZ4_compressBound(). note : destination buffer must be already allocated. To avoid any problem, size it to handle worst cases situations (input data not compressible) Worst case size evaluation is provided by function LZ4_compressBound() (see "lz4.h")
|
|
LZ4_compressBound ( int isize ) : int |
Provides the maximum size that LZ4 may output in a "worst case" scenario (input data not compressible) primarily useful for memory allocation of output buffer.
|
|
LZ4_compressHC ( byte source, byte destination, |
Native method call (PInvoke) to the LZ4_compressHC method. It provide a High Compression mode that is slower but with a better compression rate. The platform target (X86 or X64) is chosen at runtime. Description: Compresses 'isize' bytes from 'source' into 'dest'. Destination buffer must be already allocated, and must be sized to handle worst cases situations (input data not compressible) Worst case size evaluation is provided by function LZ4_compressBound(). note : destination buffer must be already allocated. To avoid any problem, size it to handle worst cases situations (input data not compressible) Worst case size evaluation is provided by function LZ4_compressBound() (see "lz4.h")
|
|
LZ4_uncompress ( byte source, byte destination, |
Native method call (PInvoke) to the LZ4_uncompress method. The platform target (X86 or X64) is chosen at runtime. Description: note : destination buffer must be already allocated. its size must be a minimum of 'osize' bytes.
|
Method | Description | |
---|---|---|
LZ4_compressHC_x64 ( byte source, byte destination, |
||
LZ4_compressHC_x86 ( byte source, byte destination, |
||
LZ4_compress_x64 ( byte source, byte destination, |
||
LZ4_compress_x86 ( byte source, byte destination, |
||
LZ4_uncompress_x64 ( byte source, byte destination, |
||
LZ4_uncompress_x86 ( byte source, byte destination, |
public static Compress ( byte data, |
||
data | byte | The data to be compressed. |
offset | The offset. | |
length | The length. | |
buffer | byte | The compression buffer. If the buffer is null or the size is insuficient, a new array will be created. |
mode | Lz4Mode | The compression mode [Fast, HighCompression]. |
return | int |
public static CompressBytes ( byte data, |
||
data | byte | The data to be compressed. |
offset | The offset. | |
length | The length. | |
mode | Lz4Mode | The compression mode [Fast, HighCompression]. |
return | byte[] |
public static CompressBytes ( byte data, Lz4Mode mode = Lz4Mode.Fast ) : byte[] | ||
data | byte | The data to be compressed. |
mode | Lz4Mode | The compression mode [Fast, HighCompression]. |
return | byte[] |
public static CompressString ( string text, Lz4Mode mode = Lz4Mode.Fast ) : string | ||
text | string | The text. |
mode | Lz4Mode | The compression mode [Fast, HighCompression]. |
return | string |
public static Decompress ( byte data, int offset, byte &buffer ) : int | ||
data | byte | The compressed data returned by a Lz4.CompressBytes or Lz4.Compress method. |
offset | int | The data buffer offset. |
buffer | byte | The decompression buffer. If the buffer is null or the size is insuficient, a new array will be created. |
return | int |
public static DecompressBytes ( byte data ) : byte[] | ||
data | byte | The compressed data returned by a Lz4.CompressBytes or Lz4.Compress method. |
return | byte[] |
public static DecompressString ( string compressedText ) : string | ||
compressedText | string | The compressed text. |
return | string |
public static GetCompressedSize ( byte data ) : int | ||
data | byte | The buffer returned by a Lz4.CompressBytes or Lz4.CompressBytesHC method. |
return | int |
public static GetUncompressedSize ( byte data ) : int | ||
data | byte | The buffer returned by a Lz4.CompressBytes or Lz4.CompressBytesHC method. |
return | int |
public static LZ4_compress ( byte source, byte destination, |
||
source | byte | The source (input). |
destination | byte | The destination (output). Its memory must alredy be allocated, use LZ4_compressBound for the size hint. |
size | The source size. Max supported value is ~1.9GB. | |
return | int |
public static LZ4_compressBound ( int isize ) : int | ||
isize | int | is the input size. Max supported value is ~1.9GB. |
return | int |
public static LZ4_compressHC ( byte source, byte destination, |
||
source | byte | The source (input). |
destination | byte | The destination (output). Its memory must alredy be allocated, use LZ4_compressBound for the size hint. |
size | The source size. Max supported value is ~1.9GB. | |
return | int |
public static LZ4_uncompress ( byte source, byte destination, |
||
source | byte | The source (input). |
destination | byte | The destination (output). Its memory must alredy be allocated, use LZ4_compressBound for the size hint. |
originalSize | Size of the original buffer. Is the output size, therefore the original size. | |
return | int |