Package org.xerial.snappy
Interface SnappyApi
- All Known Implementing Classes:
SnappyNative
public interface SnappyApi
Snappy compressor/decompressor interface. The implementation can be JNI binding or pure-java Snappy implementation.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
isValidCompressedBuffer
(long inputAddr, long offset, long len) boolean
isValidCompressedBuffer
(Object input, int offset, int len) boolean
isValidCompressedBuffer
(ByteBuffer compressed, int offset, int len) int
maxCompressedLength
(int source_bytes) long
rawCompress
(long inputAddr, long inputSize, long destAddr) int
rawCompress
(Object input, int inputOffset, int inputByteLength, Object output, int outputOffset) int
rawCompress
(ByteBuffer input, int inputOffset, int inputLength, ByteBuffer compressed, int outputOffset) long
rawUncompress
(long inputAddr, long inputSize, long destAddr) int
rawUncompress
(Object input, int inputOffset, int inputLength, Object output, int outputOffset) int
rawUncompress
(ByteBuffer compressed, int inputOffset, int inputLength, ByteBuffer uncompressed, int outputOffset) long
uncompressedLength
(long inputAddr, long len) int
uncompressedLength
(Object input, int offset, int len) int
uncompressedLength
(ByteBuffer compressed, int offset, int len)
-
Method Details
-
rawCompress
- Throws:
IOException
-
rawUncompress
- Throws:
IOException
-
rawCompress
int rawCompress(ByteBuffer input, int inputOffset, int inputLength, ByteBuffer compressed, int outputOffset) throws IOException - Throws:
IOException
-
rawCompress
int rawCompress(Object input, int inputOffset, int inputByteLength, Object output, int outputOffset) throws IOException - Throws:
IOException
-
rawUncompress
int rawUncompress(ByteBuffer compressed, int inputOffset, int inputLength, ByteBuffer uncompressed, int outputOffset) throws IOException - Throws:
IOException
-
rawUncompress
int rawUncompress(Object input, int inputOffset, int inputLength, Object output, int outputOffset) throws IOException - Throws:
IOException
-
maxCompressedLength
int maxCompressedLength(int source_bytes) -
uncompressedLength
- Throws:
IOException
-
uncompressedLength
- Throws:
IOException
-
uncompressedLength
- Throws:
IOException
-
isValidCompressedBuffer
- Throws:
IOException
-
isValidCompressedBuffer
- Throws:
IOException
-
isValidCompressedBuffer
- Throws:
IOException
-
arrayCopy
- Throws:
IOException
-