Skip to content

Commit b833326

Browse files
Morten Grouleffluben
Morten Grouleff
authored andcommitted
Adding a getByReferenceBuffer() method.
1 parent 2a262bf commit b833326

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/main/java/com/github/luben/zstd/ZstdDictCompress.java

+7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ public class ZstdDictCompress extends SharedDictBase {
2121

2222
private native void free();
2323

24+
/**
25+
* Get the byte buffer that backs this dict, if any, or null if not backed by a byte buffer.
26+
*/
27+
public ByteBuffer getByReferenceBuffer() {
28+
return sharedDict;
29+
}
30+
2431
/**
2532
* Convenience constructor to create a new dictionary for use with fast compress
2633
*

src/main/java/com/github/luben/zstd/ZstdDictDecompress.java

+7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ public class ZstdDictDecompress extends SharedDictBase {
1919

2020
private native void free();
2121

22+
/**
23+
* Get the byte buffer that backs this dict, if any, or null if not backed by a byte buffer.
24+
*/
25+
public ByteBuffer getByReferenceBuffer() {
26+
return sharedDict;
27+
}
28+
2229
/**
2330
* Convenience constructor to create a new dictionary for use with fast decompress
2431
*

0 commit comments

Comments
 (0)