File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
leveldb/src/main/java/org/iq80/leveldb/util Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -172,3 +172,11 @@ factory.destroy(new File("example"), options);
172172
173173* [ ActiveMQ Apollo] ( http://activemq.apache.org/apollo/ ) : Defaults to using leveldbjni, but falls
174174 back to this port if the jni port is not available on your platform.
175+
176+ ## Notes
177+ ### Snappy compression
178+
179+ In order to use this library with leveldb databases using Snappy compression,
180+ you need to also include one of the following libraries:
181+ * ` org.xerial.snappy:snappy-java:1.1.8.4 `
182+ * ` org.iq80.snappy:snappy:0.4 `
Original file line number Diff line number Diff line change @@ -231,6 +231,9 @@ public static boolean available()
231231 public static void uncompress (ByteBuffer compressed , ByteBuffer uncompressed )
232232 throws IOException
233233 {
234+ if (SNAPPY == null )
235+ throw new RuntimeException ("This is a compressed database, and snappy library is not found in your classpath!" +
236+ " (e.g. https://github.com/dain/leveldb/#snappy-compression)" );
234237 SNAPPY .uncompress (compressed , uncompressed );
235238 }
236239
You can’t perform that action at this time.
0 commit comments