![]() ![]() Stream-based compressor/decompressor SnappyOutputStream/ SnappyInputStream are also available for reading/writing large data sets. ), Snappy.rawUncompress(.), etc.), which minimize memory copies, can be used. In addition, high-level methods ( press(String), press(float. String result = new String( uncompressed, "UTF-8") getBytes( "UTF-8")) īyte uncompressed = Snappy. + "Snappy, a fast compresser/decompresser." īyte compressed = Snappy. String input = "Hello snappy-java! Snappy-java is a JNI-based wrapper of " Add the following dependency to your pom.xml: Snappy-java is available from Maven's central repository. Snapshot version (the latest beta version):.The current stable version is available from here: ![]() The decompression speed is twice as fast as the others: The benchmark result indicates snappy-java is the fastest compressor/decompressor in Java: Thanks Tatu Saloranta for providing the benchmark suite. Here are some benchmark results, comparing So the compression ratio of snappy-java is modest and about the same as LZF (ranging 20%-100% according to the dataset). Snappy's main target is very high-speed compression/decompression with reasonable compression size. Free for both commercial and non-commercial use. Framing-format support (Since 1.1.0 version).Then call compression/decompression methods in. Add the snappy-java-(version).jar file to your classpath. snappy-java loads one of these libraries according to your machine environment (It looks system properties, os.name and os.arch). Portable across various operating systems Snappy-java contains native libraries built for Window/Mac/Linux, etc.To improve the compression ratios of these arrays, you can use a fast data-rearrangement implementation ( BitShuffle) before compression.Compression/decompression of Java primitive arrays ( float, double, int, short, long, etc.).Although snappy-java uses JNI, it can be used safely with multiple class loaders (e.g.JNI-based implementation to achieve comparable performance to the native C++ version.SnappyOutputStream uses only 32KB+ in default. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |