C# Класс Lucene.Net.Documents.CompressionTools

Simple utility class providing static methods to compress and decompress binary data for stored fields. This class uses java.util.zip.Deflater and Inflater classes to compress and decompress, which is the same format previously used by the now deprecated Field.Store.COMPRESS.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Compress ( byte value ) : byte[]

Compresses all bytes in the array, with default BEST_COMPRESSION level

Compress ( byte value, int offset, int length ) : byte[]

Compresses the specified byte range, with default BEST_COMPRESSION level

Compress ( byte value, int offset, int length, int compressionLevel ) : byte[]

Compresses the specified byte range using the specified compressionLevel (constants are defined in java.util.zip.Deflater).

CompressString ( string value ) : byte[]

Compresses the String value, with default BEST_COMPRESSION level

CompressString ( string value, int compressionLevel ) : byte[]

Compresses the String value using the specified compressionLevel (constants are defined in java.util.zip.Deflater).

Decompress ( BytesRef bytes ) : byte[]

Decompress the byte array previously returned by compress (referenced by the provided BytesRef)

Decompress ( byte value ) : byte[]

Decompress the byte array previously returned by compress

Decompress ( byte value, int offset, int length ) : byte[]

Decompress the byte array previously returned by compress

DecompressString ( BytesRef bytes ) : string

Decompress the byte array (referenced by the provided BytesRef) previously returned by compressString back into a String

DecompressString ( byte value ) : string

Decompress the byte array previously returned by compressString back into a String

DecompressString ( byte value, int offset, int length ) : string

Decompress the byte array previously returned by compressString back into a String

Приватные методы

Метод Описание
CompressionTools ( ) : System

Описание методов

Compress() публичный статический Метод

Compresses all bytes in the array, with default BEST_COMPRESSION level
public static Compress ( byte value ) : byte[]
value byte
Результат byte[]

Compress() публичный статический Метод

Compresses the specified byte range, with default BEST_COMPRESSION level
public static Compress ( byte value, int offset, int length ) : byte[]
value byte
offset int
length int
Результат byte[]

Compress() публичный статический Метод

Compresses the specified byte range using the specified compressionLevel (constants are defined in java.util.zip.Deflater).
public static Compress ( byte value, int offset, int length, int compressionLevel ) : byte[]
value byte
offset int
length int
compressionLevel int
Результат byte[]

CompressString() публичный статический Метод

Compresses the String value, with default BEST_COMPRESSION level
public static CompressString ( string value ) : byte[]
value string
Результат byte[]

CompressString() публичный статический Метод

Compresses the String value using the specified compressionLevel (constants are defined in java.util.zip.Deflater).
public static CompressString ( string value, int compressionLevel ) : byte[]
value string
compressionLevel int
Результат byte[]

Decompress() публичный статический Метод

Decompress the byte array previously returned by compress (referenced by the provided BytesRef)
public static Decompress ( BytesRef bytes ) : byte[]
bytes BytesRef
Результат byte[]

Decompress() публичный статический Метод

Decompress the byte array previously returned by compress
public static Decompress ( byte value ) : byte[]
value byte
Результат byte[]

Decompress() публичный статический Метод

Decompress the byte array previously returned by compress
public static Decompress ( byte value, int offset, int length ) : byte[]
value byte
offset int
length int
Результат byte[]

DecompressString() публичный статический Метод

Decompress the byte array (referenced by the provided BytesRef) previously returned by compressString back into a String
public static DecompressString ( BytesRef bytes ) : string
bytes BytesRef
Результат string

DecompressString() публичный статический Метод

Decompress the byte array previously returned by compressString back into a String
public static DecompressString ( byte value ) : string
value byte
Результат string

DecompressString() публичный статический Метод

Decompress the byte array previously returned by compressString back into a String
public static DecompressString ( byte value, int offset, int length ) : string
value byte
offset int
length int
Результат string