Class CompressionTools
Simple utility class providing static methods to
compress and decompress binary data for stored fields.
this class uses the DeflateStream
class to compress and decompress.
Inheritance
CompressionTools
Assembly: Lucene.Net.dll
public static class CompressionTools
Methods
Compresses all bytes in the array, with default Optimal level
Declaration
public static byte[] Compress(byte[] value)
Parameters
Type |
Name |
Description |
byte[] |
value |
|
Returns
Compresses the specified byte range, with default Optimal level
Declaration
public static byte[] Compress(byte[] value, int offset, int length)
Parameters
Type |
Name |
Description |
byte[] |
value |
|
int |
offset |
|
int |
length |
|
Returns
Compresses the specified byte range using the
specified compressionLevel
.
Declaration
public static byte[] Compress(byte[] value, int offset, int length, CompressionLevel compressionLevel)
Parameters
Returns
Declaration
public static byte[] CompressString(string value)
Parameters
Type |
Name |
Description |
string |
value |
|
Returns
Compresses the string value using the specified
compressionLevel
.
Declaration
public static byte[] CompressString(string value, CompressionLevel compressionLevel)
Parameters
Returns
Decompress the byte array previously returned by
compress (referenced by the provided BytesRef)
Declaration
public static byte[] Decompress(BytesRef bytes)
Parameters
Returns
Decompress the byte array previously returned by
compress
Declaration
public static byte[] Decompress(byte[] value)
Parameters
Type |
Name |
Description |
byte[] |
value |
|
Returns
Decompress the byte array previously returned by
compress
Declaration
public static byte[] Decompress(byte[] value, int offset, int length)
Parameters
Type |
Name |
Description |
byte[] |
value |
|
int |
offset |
|
int |
length |
|
Returns
Declaration
public static string DecompressString(BytesRef bytes)
Parameters
Returns
Declaration
public static string DecompressString(byte[] value)
Parameters
Type |
Name |
Description |
byte[] |
value |
|
Returns
Declaration
public static string DecompressString(byte[] value, int offset, int length)
Parameters
Type |
Name |
Description |
byte[] |
value |
|
int |
offset |
|
int |
length |
|
Returns