Package org.iq80.leveldb.util
Class Snappy
java.lang.Object
org.iq80.leveldb.util.Snappy
A Snappy abstraction which attempts uses the iq80 implementation and falls back to the xerial Snappy implementation it cannot be loaded. You can change the load order by setting the 'leveldb.snappy' system property. Example:
-Dleveldb.snappy=xerial,iq80
The system property can also be configured with the name of a class which
implements the Snappy.SPI interface.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic intcompress(byte[] input, int inputOffset, int length, byte[] output, int outputOffset) static byte[]static intmaxCompressedLength(int length) static voiduncompress(byte[] input, int inputOffset, int length, byte[] output, int outputOffset) static voiduncompress(ByteBuffer compressed, ByteBuffer uncompressed)
-
Field Details
-
SNAPPY
-
-
Constructor Details
-
Snappy
private Snappy()
-
-
Method Details
-
available
public static boolean available() -
uncompress
- Throws:
IOException
-
uncompress
public static void uncompress(byte[] input, int inputOffset, int length, byte[] output, int outputOffset) throws IOException - Throws:
IOException
-
compress
public static int compress(byte[] input, int inputOffset, int length, byte[] output, int outputOffset) throws IOException - Throws:
IOException
-
compress
- Throws:
IOException
-
maxCompressedLength
public static int maxCompressedLength(int length)
-