mirror of
https://github.com/xerial/snappy-java.git
synced 2025-07-22 05:24:27 +02:00
Fix the dependency to JNI header
This commit is contained in:
parent
7c56cade26
commit
7b52820c44
2
Makefile
2
Makefile
@ -30,7 +30,7 @@ $(SNAPPY_OUT)/%.o : $(SNAPPY_SRC)/%.cc
|
||||
@mkdir -p $(@D)
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
$(SNAPPY_OUT)/%.o : $(SRC)/org/xerial/snappy/SnappyNative.cpp
|
||||
$(SNAPPY_OUT)/%.o : $(SRC)/org/xerial/snappy/SnappyNative.cpp $(SRC)/org/xerial/snappy/SnappyNative.h
|
||||
@mkdir -p $(@D)
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
|
@ -13,19 +13,23 @@ import java.nio.ByteBuffer;
|
||||
|
||||
public class Snappy
|
||||
{
|
||||
static {
|
||||
LoadSnappy.initialize();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Generic compression/decompression routines.
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
public native long compress(ByteBuffer uncompressed, ByteBuffer compressed);
|
||||
public native static long compress(ByteBuffer uncompressed, ByteBuffer compressed);
|
||||
|
||||
public native boolean uncompress(ByteBuffer compressed, ByteBuffer uncompressed);
|
||||
public native static boolean uncompress(ByteBuffer compressed, ByteBuffer uncompressed);
|
||||
|
||||
// Returns the maximal size of the compressed representation of
|
||||
// input data that is "source_bytes" bytes in length;
|
||||
public native long maxCompressedLength(long source_bytes);
|
||||
public native static long maxCompressedLength(long source_bytes);
|
||||
|
||||
// This operation takes O(1) time.
|
||||
public native long getUncompressedLength(ByteBuffer compressed);
|
||||
public native static long getUncompressedLength(ByteBuffer compressed);
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ extern "C" {
|
||||
* Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_org_xerial_snappy_Snappy_compress
|
||||
(JNIEnv *, jobject, jobject, jobject);
|
||||
(JNIEnv *, jclass, jobject, jobject);
|
||||
|
||||
/*
|
||||
* Class: org_xerial_snappy_Snappy
|
||||
@ -21,7 +21,7 @@ JNIEXPORT jlong JNICALL Java_org_xerial_snappy_Snappy_compress
|
||||
* Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_org_xerial_snappy_Snappy_uncompress
|
||||
(JNIEnv *, jobject, jobject, jobject);
|
||||
(JNIEnv *, jclass, jobject, jobject);
|
||||
|
||||
/*
|
||||
* Class: org_xerial_snappy_Snappy
|
||||
@ -29,7 +29,7 @@ JNIEXPORT jboolean JNICALL Java_org_xerial_snappy_Snappy_uncompress
|
||||
* Signature: (J)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_org_xerial_snappy_Snappy_maxCompressedLength
|
||||
(JNIEnv *, jobject, jlong);
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
/*
|
||||
* Class: org_xerial_snappy_Snappy
|
||||
@ -37,7 +37,7 @@ JNIEXPORT jlong JNICALL Java_org_xerial_snappy_Snappy_maxCompressedLength
|
||||
* Signature: (Ljava/nio/ByteBuffer;)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_org_xerial_snappy_Snappy_getUncompressedLength
|
||||
(JNIEnv *, jobject, jobject);
|
||||
(JNIEnv *, jclass, jobject);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user