Package org.apache.solr.common.util
Interface Compressor
- 
- All Known Implementing Classes:
- ZLibCompressor
 
 public interface Compressor
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]compressBytes(byte[] data)Compresses bytes into compressed bytes using the compression implementationbyte[]compressBytes(byte[] data, int initialBufferCapacity)Compresses bytes into compressed bytes using the compression implementationbyte[]decompressBytes(byte[] data)Decompresses compressed bytes, returning the uncompressed data as a byte[]booleanisCompressedBytes(byte[] data)Check to determine if the data is compressed in the expected compression implementation
 
- 
- 
- 
Method Detail- 
isCompressedBytesboolean isCompressedBytes(byte[] data) Check to determine if the data is compressed in the expected compression implementation- Parameters:
- data- - the bytes to check for compression
- Returns:
- true if the data is compressed in the expected compression implementation
 
 - 
decompressBytesbyte[] decompressBytes(byte[] data) throws ExceptionDecompresses compressed bytes, returning the uncompressed data as a byte[]- Parameters:
- data- the input compressed data to decompress
- Returns:
- the decompressed bytes
- Throws:
- Exception- - The data is not compressed or the data is not compressed in the correct format
 
 - 
compressBytesbyte[] compressBytes(byte[] data) Compresses bytes into compressed bytes using the compression implementation- Parameters:
- data- the input uncompressed data to be compressed
- Returns:
- compressed bytes
 
 - 
compressBytesbyte[] compressBytes(byte[] data, int initialBufferCapacity)Compresses bytes into compressed bytes using the compression implementation- Parameters:
- data- the input uncompressed data to be compressed
- initialBufferCapacity- the initial capacity of the buffer storing the compressed data. It depends on the data type and the caller may know the expected average compression factor. If this initial capacity is smaller than 16, the buffer capacity will be 16 anyway.
- Returns:
- compressed bytes
 
 
- 
 
-