Package org.apache.solr.common.util
Interface Compressor
-
- All Known Implementing Classes:
ZLibCompressor
public interface Compressor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
compressBytes(byte[] data)
Compresses bytes into compressed bytes using the compression implementationbyte[]
decompressBytes(byte[] data)
Decompresses compressed bytes, returning the uncompressed data as a byte[]boolean
isCompressedBytes(byte[] data)
Check to determine if the data is compressed in the expected compression implementation
-
-
-
Method Detail
-
isCompressedBytes
boolean 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
-
decompressBytes
byte[] decompressBytes(byte[] data) throws Exception
Decompresses 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
-
compressBytes
byte[] compressBytes(byte[] data)
Compresses bytes into compressed bytes using the compression implementation- Parameters:
data
- the input uncompressed data to be compressed- Returns:
- compressed bytes
-
-