Permalink
Browse files

Merge branch 'release/1.1.0-M2'

  • Loading branch information...
2 parents aba95c4 + 733a2f3 commit 8d097faaf5b19cb8c7619d089087a0cd677e5c14 @xerial committed Mar 28, 2013
View
@@ -2,7 +2,11 @@
* `SnappyIndexer` for parallel compression/decompression
* CUI commands (snap/unsnap)
-## snappy-java-1.1.0-M1 (27 March, 2013)
+## snappy-java-1.1.0-M2 (28 March 2013)
+ * Fix linux amd64 build
+ * Fixes #26
+
+## snappy-java-1.1.0-M1 (27 March 2013)
* Upgrade to snappy-1.1.0
* Add zero-copy compression (rawCompress, rawUncompress) that can be used with LArray <https://github.com/xerial/larray>
* Drop 32-bit Mac support
View
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
- <version>1.1.0-M1</version>
+ <version>1.1.0-M2</version>
<name>Snappy for Java</name>
<description>snappy-java: A fast compression/decompression library</description>
<packaging>bundle</packaging>
@@ -151,7 +151,7 @@ public static int compress(ByteBuffer uncompressed, ByteBuffer compressed) throw
* @param input
* @return the compressed data
*/
- public static byte[] compress(char[] input) {
+ public static byte[] compress(char[] input) throws IOException {
return rawCompress(input, input.length * 2); // char uses 2 bytes
}
@@ -161,7 +161,7 @@ public static int compress(ByteBuffer uncompressed, ByteBuffer compressed) throw
* @param input
* @return the compressed data
*/
- public static byte[] compress(double[] input) {
+ public static byte[] compress(double[] input) throws IOException {
return rawCompress(input, input.length * 8); // double uses 8 bytes
}
@@ -171,7 +171,7 @@ public static int compress(ByteBuffer uncompressed, ByteBuffer compressed) throw
* @param input
* @return the compressed data
*/
- public static byte[] compress(float[] input) {
+ public static byte[] compress(float[] input) throws IOException {
return rawCompress(input, input.length * 4); // float uses 4 bytes
}
@@ -181,7 +181,7 @@ public static int compress(ByteBuffer uncompressed, ByteBuffer compressed) throw
* @param input
* @return the compressed data
*/
- public static byte[] compress(int[] input) {
+ public static byte[] compress(int[] input) throws IOException {
return rawCompress(input, input.length * 4); // int uses 4 bytes
}
@@ -191,7 +191,7 @@ public static int compress(ByteBuffer uncompressed, ByteBuffer compressed) throw
* @param input
* @return the compressed data
*/
- public static byte[] compress(long[] input) {
+ public static byte[] compress(long[] input) throws IOException {
return rawCompress(input, input.length * 8); // long uses 8 bytes
}
@@ -201,7 +201,7 @@ public static int compress(ByteBuffer uncompressed, ByteBuffer compressed) throw
* @param input
* @return the compressed data
*/
- public static byte[] compress(short[] input) {
+ public static byte[] compress(short[] input) throws IOException {
return rawCompress(input, input.length * 2); // short uses 2 bytes
}
@@ -354,7 +354,7 @@ public static long rawUncompress(long inputAddr, long inputSize, long destAddr)
* the input byte size
* @return compressed data
*/
- public static byte[] rawCompress(Object data, int byteSize) {
+ public static byte[] rawCompress(Object data, int byteSize) throws IOException {
byte[] buf = new byte[Snappy.maxCompressedLength(byteSize)];
int compressedByteSize = ((SnappyNativeAPI) impl).rawCompress(data, 0, byteSize, buf, 0);
byte[] result = new byte[compressedByteSize];
@@ -18,6 +18,22 @@ JNIEXPORT jstring JNICALL Java_org_xerial_snappy_SnappyNative_nativeLibraryVersi
/*
* Class: org_xerial_snappy_SnappyNative
* Method: rawCompress
+ * Signature: (JJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_xerial_snappy_SnappyNative_rawCompress__JJJ
+ (JNIEnv *, jobject, jlong, jlong, jlong);
+
+/*
+ * Class: org_xerial_snappy_SnappyNative
+ * Method: rawUncompress
+ * Signature: (JJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_xerial_snappy_SnappyNative_rawUncompress__JJJ
+ (JNIEnv *, jobject, jlong, jlong, jlong);
+
+/*
+ * Class: org_xerial_snappy_SnappyNative
+ * Method: rawCompress
* Signature: (Ljava/nio/ByteBuffer;IILjava/nio/ByteBuffer;I)I
*/
JNIEXPORT jint JNICALL Java_org_xerial_snappy_SnappyNative_rawCompress__Ljava_nio_ByteBuffer_2IILjava_nio_ByteBuffer_2I
@@ -73,6 +89,14 @@ JNIEXPORT jint JNICALL Java_org_xerial_snappy_SnappyNative_uncompressedLength__L
/*
* Class: org_xerial_snappy_SnappyNative
+ * Method: uncompressedLength
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_xerial_snappy_SnappyNative_uncompressedLength__JJ
+ (JNIEnv *, jobject, jlong, jlong);
+
+/*
+ * Class: org_xerial_snappy_SnappyNative
* Method: isValidCompressedBuffer
* Signature: (Ljava/nio/ByteBuffer;II)Z
*/
@@ -54,7 +54,7 @@
public native int rawCompress(ByteBuffer input, int inputOffset, int inputLength, ByteBuffer compressed,
int outputOffset) throws IOException;
- public native int rawCompress(Object input, int inputOffset, int inputByteLength, Object output, int outputOffset);
+ public native int rawCompress(Object input, int inputOffset, int inputByteLength, Object output, int outputOffset) throws IOException;
public native int rawUncompress(ByteBuffer compressed, int inputOffset, int inputLength, ByteBuffer uncompressed,
int outputOffset) throws IOException;
@@ -51,7 +51,7 @@
public int rawCompress(ByteBuffer input, int inputOffset, int inputLength, ByteBuffer compressed, int outputOffset)
throws IOException;
- public int rawCompress(Object input, int inputOffset, int inputByteLength, Object output, int outputOffset);
+ public int rawCompress(Object input, int inputOffset, int inputByteLength, Object output, int outputOffset) throws IOException;
public int rawUncompress(ByteBuffer compressed, int inputOffset, int inputLength, ByteBuffer uncompressed,
int outputOffset) throws IOException;

0 comments on commit 8d097fa

Please sign in to comment.