Package com.semedy.reasoner.utils
Class Compressor
java.lang.Object
com.semedy.reasoner.utils.Compressor
Provides methods for compressing and decompressing byte arrays
- Author:
- angele
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]compressGZIP(byte[] data, int off, int len) Compress data out of a byte array at offset off and length lenbyte[]compressLZ4(byte[] data) Compress in LZ4byte[]decompressGZIP(byte[] data, int originallength) Decompress gzipped datavoiddecompressLZ4(byte[] compressedData, byte[] restored) Decompress LZ4byte[]decompressLZ4(byte[] compressedData, int originallength) Decompress LZ4
-
Constructor Details
-
Compressor
public Compressor()
-
-
Method Details
-
decompressGZIP
Decompress gzipped data- Parameters:
data- , data to be decompressedoriginallength- , the length of uncompressed data- Returns:
- decompressed data
- Throws:
IOException
-
compressLZ4
Compress in LZ4- Parameters:
data- , data- Returns:
- compressed data
- Throws:
IOException
-
decompressLZ4
Decompress LZ4- Parameters:
compressedData- , array containing compressed dataoriginallength- , the length of uncompressed data- Returns:
- decompressed data
- Throws:
IOException
-
decompressLZ4
Decompress LZ4- Parameters:
compressedData- , array containing compressed dataoriginallength- , the length of uncompressed data- Throws:
IOException
-
compressGZIP
Compress data out of a byte array at offset off and length len- Parameters:
data- , dataoff- , offset in datalen- , number of bytes to compress- Returns:
- compressed data
- Throws:
IOException
-