Skip to content

Commit

Permalink
Adding a getByReferenceBuffer() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Morten Grouleff authored and luben committed Apr 3, 2024
1 parent 2a262bf commit b833326
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/com/github/luben/zstd/ZstdDictCompress.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ public class ZstdDictCompress extends SharedDictBase {

private native void free();

/**
* Get the byte buffer that backs this dict, if any, or null if not backed by a byte buffer.
*/
public ByteBuffer getByReferenceBuffer() {
return sharedDict;
}

/**
* Convenience constructor to create a new dictionary for use with fast compress
*
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/github/luben/zstd/ZstdDictDecompress.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ public class ZstdDictDecompress extends SharedDictBase {

private native void free();

/**
* Get the byte buffer that backs this dict, if any, or null if not backed by a byte buffer.
*/
public ByteBuffer getByReferenceBuffer() {
return sharedDict;
}

/**
* Convenience constructor to create a new dictionary for use with fast decompress
*
Expand Down

0 comments on commit b833326

Please sign in to comment.