GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add native fast reset compressors by TyomaVader · Pull Request #44 · yawkat/lz4-java

Conversation

@TyomaVader

@TyomaVader TyomaVader commented Apr 3, 2026

Copy link
Copy Markdown

Introduces JNI-based fast reset compressors, significantly improving the efficiency of compressor reuse by leveraging the native fastReset API from the C library.

When executing consecutive compressions, state re-initialization on each call can be a performance bottleneck. Native LZ4_compress_fast_extState_fastReset and LZ4_compress_HC_extStateHC_fastReset methods solve this by clearing only the necessary parts of the existing external state.

Warning

Unfortunately, that introduces a pointer to native mutable memory, so these new classes are not thread-safe and require explicit release of native resources (via close()).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
TyomaVader added 4 commits April 3, 2026 13:19
@TyomaVader
Add native fast reset compressors
045b9c8
@TyomaVader
Add native fast reset compressor tests
c01b7f4
@TyomaVader
Simplify byte buffer paths
ad9a637
@TyomaVader
Add constructor normalization for compression level and acceleration
3661c7c
yawkat
yawkat reviewed Apr 8, 2026
View reviewed changes
Comment thread src/java/net/jpountz/lz4/LZ4JNIFastResetCompressor.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

yawkat
yawkat reviewed Apr 8, 2026
View reviewed changes
Comment thread src/java/net/jpountz/lz4/LZ4JNIFastResetCompressor.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

TyomaVader added 2 commits April 8, 2026 18:43
@TyomaVader
Switch to a lock for guarding the statePtr
47c6557
@TyomaVader
Add missing HC test
976efdf
yawkat
yawkat reviewed Apr 8, 2026
View reviewed changes
Comment thread src/test/net/jpountz/lz4/LZ4FastResetTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

yawkat
yawkat reviewed Apr 8, 2026
View reviewed changes
Comment thread src/java/net/jpountz/lz4/LZ4JNIFastResetCompressor.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

yawkat
yawkat reviewed Apr 8, 2026
View reviewed changes
Comment thread src/java/net/jpountz/lz4/LZ4JNIHCFastResetCompressor.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

yawkat
yawkat reviewed Apr 8, 2026
View reviewed changes
Comment thread src/test/net/jpountz/lz4/LZ4FastResetTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@yawkat yawkat mentioned this pull request Apr 8, 2026
Add linux-riscv64 binary #46
Merged
TyomaVader added 3 commits April 9, 2026 09:35
@TyomaVader
Throw on concurrent close attempt
ac25954
@TyomaVader
Throw on unsupported buffer attempt
8f168ec
@TyomaVader
Move shared logic to an abstract base class
b501546
@TyomaVader
TyomaVader requested a review from yawkat April 9, 2026 07:49
@yawkat
yawkat merged commit 91d1609 into yawkat:main Apr 9, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@yawkat

yawkat commented Apr 9, 2026

Copy link
Copy Markdown
Owner

Thanks! I will wait for @luhenry to test #46 and then i'll cut a release.

luhenry and TyomaVader reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TyomaVader
TyomaVader deleted the feat/fast-reset-compressor branch April 10, 2026 11:13
@dongjoon-hyun dongjoon-hyun mentioned this pull request Apr 10, 2026
[SPARK-56441][BUILD] Upgrade lz4-java to 1.11.0 apache/spark#55295
Closed
pan3793 pushed a commit to apache/spark that referenced this pull request Apr 11, 2026
@dongjoon-hyun @pan3793
[SPARK-56441][BUILD] Upgrade lz4-java to 1.11.0
3215ca7
### What changes were proposed in this pull request?

This PR aims to upgrade `at.yawk.lz4:lz4-java` to 1.11.0.

### Why are the changes needed?

To bring new improvements of `lz4-java` library.

- https://github.com/yawkat/lz4-java/releases/tag/v1.11.0
  - yawkat/lz4-java#44

### Does this PR introduce _any_ user-facing change?

No, this is a dependency-only change.

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Opus 4.6

Closes #55295 from dongjoon-hyun/SPARK-56441.

Lead-authored-by: Dongjoon Hyun <[email protected]>
Co-authored-by: dongjoon-hyun <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
mergify Bot added a commit to ArcadeData/arcadedb that referenced this pull request Apr 13, 2026
@mergify
chore(deps): bump at.yawk.lz4:lz4-java from 1.10.4 to 1.11.0 [skip ci]
d4a66a3
Bumps [at.yawk.lz4:lz4-java](https://github.com/yawkat/lz4-java) from 1.10.4 to 1.11.0.
Release notes

*Sourced from [at.yawk.lz4:lz4-java's releases](https://github.com/yawkat/lz4-java/releases).*

> lz4-java v1.11.0
> ----------------
>
> What's Changed
> --------------
>
> * Add linux-riscv64 binary by [`@​luhenry`](https://github.com/luhenry) in [yawkat/lz4-java#46](https://redirect.github.com/yawkat/lz4-java/pull/46)
> * Bump checkout action version by [`@​TyomaVader`](https://github.com/TyomaVader) in [yawkat/lz4-java#47](https://redirect.github.com/yawkat/lz4-java/pull/47)
> * Add native fast reset compressors by [`@​TyomaVader`](https://github.com/TyomaVader) in [yawkat/lz4-java#44](https://redirect.github.com/yawkat/lz4-java/pull/44)
> * Fix docs production deployment by [`@​yawkat`](https://github.com/yawkat) in [yawkat/lz4-java#49](https://redirect.github.com/yawkat/lz4-java/pull/49)
> * Add testing on native amd64, arm, and riscv runners by [`@​luhenry`](https://github.com/luhenry) in [yawkat/lz4-java#50](https://redirect.github.com/yawkat/lz4-java/pull/50)
>
> New Contributors
> ----------------
>
> * [`@​luhenry`](https://github.com/luhenry) made their first contribution in [yawkat/lz4-java#46](https://redirect.github.com/yawkat/lz4-java/pull/46)
> * [`@​TyomaVader`](https://github.com/TyomaVader) made their first contribution in [yawkat/lz4-java#47](https://redirect.github.com/yawkat/lz4-java/pull/47)
>
> **Full Changelog**: <yawkat/lz4-java@v1.10.4...v1.11.0>


Commits

* [`5049a27`](yawkat/lz4-java@5049a27) Add testing on native amd64, arm, and riscv runners ([#50](https://redirect.github.com/yawkat/lz4-java/issues/50))
* [`dc0e761`](yawkat/lz4-java@dc0e761) Fix docs production deployment ([#49](https://redirect.github.com/yawkat/lz4-java/issues/49))
* [`91d1609`](yawkat/lz4-java@91d1609) Add native fast reset compressors ([#44](https://redirect.github.com/yawkat/lz4-java/issues/44))
* [`e122114`](yawkat/lz4-java@e122114) Bump checkout action version ([#47](https://redirect.github.com/yawkat/lz4-java/issues/47))
* [`ed8f477`](yawkat/lz4-java@ed8f477) Add linux-riscv64 binary ([#46](https://redirect.github.com/yawkat/lz4-java/issues/46))
* See full diff in [compare view](yawkat/lz4-java@v1.10.4...v1.11.0)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=at.yawk.lz4:lz4-java&package-manager=maven&previous-version=1.10.4&new-version=1.11.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
tae898 pushed a commit to humemai/arcadedb-embedded-python that referenced this pull request Jun 28, 2026
@mergify
chore(deps): bump at.yawk.lz4:lz4-java from 1.10.4 to 1.11.0 [skip ci]
030e010
Bumps [at.yawk.lz4:lz4-java](https://github.com/yawkat/lz4-java) from 1.10.4 to 1.11.0.
Release notes

*Sourced from [at.yawk.lz4:lz4-java's releases](https://github.com/yawkat/lz4-java/releases).*

> lz4-java v1.11.0
> ----------------
>
> What's Changed
> --------------
>
> * Add linux-riscv64 binary by [`@​luhenry`](https://github.com/luhenry) in [yawkat/lz4-java#46](https://redirect.github.com/yawkat/lz4-java/pull/46)
> * Bump checkout action version by [`@​TyomaVader`](https://github.com/TyomaVader) in [yawkat/lz4-java#47](https://redirect.github.com/yawkat/lz4-java/pull/47)
> * Add native fast reset compressors by [`@​TyomaVader`](https://github.com/TyomaVader) in [yawkat/lz4-java#44](https://redirect.github.com/yawkat/lz4-java/pull/44)
> * Fix docs production deployment by [`@​yawkat`](https://github.com/yawkat) in [yawkat/lz4-java#49](https://redirect.github.com/yawkat/lz4-java/pull/49)
> * Add testing on native amd64, arm, and riscv runners by [`@​luhenry`](https://github.com/luhenry) in [yawkat/lz4-java#50](https://redirect.github.com/yawkat/lz4-java/pull/50)
>
> New Contributors
> ----------------
>
> * [`@​luhenry`](https://github.com/luhenry) made their first contribution in [yawkat/lz4-java#46](https://redirect.github.com/yawkat/lz4-java/pull/46)
> * [`@​TyomaVader`](https://github.com/TyomaVader) made their first contribution in [yawkat/lz4-java#47](https://redirect.github.com/yawkat/lz4-java/pull/47)
>
> **Full Changelog**: <yawkat/lz4-java@v1.10.4...v1.11.0>


Commits

* [`5049a27`](yawkat/lz4-java@5049a27) Add testing on native amd64, arm, and riscv runners ([#50](https://redirect.github.com/yawkat/lz4-java/issues/50))
* [`dc0e761`](yawkat/lz4-java@dc0e761) Fix docs production deployment ([#49](https://redirect.github.com/yawkat/lz4-java/issues/49))
* [`91d1609`](yawkat/lz4-java@91d1609) Add native fast reset compressors ([#44](https://redirect.github.com/yawkat/lz4-java/issues/44))
* [`e122114`](yawkat/lz4-java@e122114) Bump checkout action version ([#47](https://redirect.github.com/yawkat/lz4-java/issues/47))
* [`ed8f477`](yawkat/lz4-java@ed8f477) Add linux-riscv64 binary ([#46](https://redirect.github.com/yawkat/lz4-java/issues/46))
* See full diff in [compare view](yawkat/lz4-java@v1.10.4...v1.11.0)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=at.yawk.lz4:lz4-java&package-manager=maven&previous-version=1.10.4&new-version=1.11.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@yawkat yawkat Awaiting requested review from yawkat

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@TyomaVader @yawkat
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.