luben / zstd-jni

JNI binding for Zstd
Other
809 stars 165 forks source link

ZstdDecompressCtx: pass nativePtr directly to JNI calls #247

Closed jamie-walker closed 1 year ago

jamie-walker commented 1 year ago

This avoids having to lookup the field and fixes a bug where the wrong fieldId was passed causing a segfault if ZstdDecompressCtx#reset() was called before ZstdCompressCtx() was used.

luben commented 1 year ago

Yes, that makes sense. I don't know why I didn't pass the ptr by value.

luben commented 1 year ago

Just released 1.5.4-2 with that fix and similar refactor of the ZstdCompressionCtx.