镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Rework README, add contributing guide, Scorecard and coverage - #147

Merged
yawkat merged 5 commits into
mainfrom
claude/readme-update-22ef1b
Sep 25, 2026
Merged

yawkat merged 5 commits into
mainfrom
claude/readme-update-22ef1b

Conversation

@yawkat

@yawkat yawkat commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

The README still read like a one-off CVE patch fork of the old upstream project. This rewrite brings it up to date with the current state of the library.

Changes

  • Intro: describes the fork as the maintained, drop-in continuation of lz4/lz4-java (same net.jpountz.* packages, new coordinates).
  • Installation: Maven and Gradle snippets, how to replace org.lz4:lz4-java, Java 7 minimum, Automatic-Module-Name/OSGi, the bundled native platforms (taken from build-all-and-publish.yml) and the JDK 24+ --enable-native-access warning.
    • No version is hardcoded. A Maven Central badge shows the latest version and the snippets use a VERSION placeholder, so the README won't go stale.
  • Choosing an API: a table covering frame streams, *WithLength, raw blocks and xxHash. It notes that block streams use an lz4-java-specific format.
  • Decompressors: recommends safeDecompressor(), explains that fastDecompressor() now always uses the safe Java code, and warns about the *InsecureInstance() factories. Also notes that the LZ4 unsafeInstance() currently aliases the safe instance.
  • Examples: modernized (try-with-resources, readAllBytes). Adds a length-prefixed example with the 64 MiB default limit and its system property, and one-shot plus streaming xxHash.
  • New sections: Security (advisories and private vulnerability reporting), License.
  • Build: updated to JDK 25 plus a JDK 7 toolchain, with a source/target 8 alternative.
  • Links: all absolute, since the docs site renders this README.

Contributing guidelines, Scorecard and coverage

  • CONTRIBUTING.md: how to report bugs and vulnerabilities, and the requirements for contributions. It is based on .clinerules/coding.md and linked from a new README section. This covers the OpenSSF Best Practices criteria for feedback and contribution information.
  • .github/workflows/scorecard.yml: runs OpenSSF Scorecard weekly, on pushes to main and on branch protection changes. It publishes results for the badge and uploads SARIF to code scanning. The actions are pinned by digest, like the rest of the repo.
  • Coverage: a new coverage Maven profile runs JaCoCo. The ubuntu-24.04 test job enables it and uploads jacoco.xml to Codecov, using OIDC and falling back to tokenless upload for PRs from forks. Upload failures don't fail CI. Locally it measures about 91% line coverage of the Java code. The C code in the JNI bindings is not measured.
  • Permissions: test.yml now has explicit least-privilege permissions, which Scorecard checks for.
  • Badges: Codecov, OpenSSF Best Practices and Scorecard.

Notes for reviewers

  • Before the Codecov upload and badge work, the repo must be enabled on codecov.io.
  • Every Java example was compiled and run against a local build of main. All round-trips succeed and the native factory loads.
  • The benchmark links still point to the old upstream 1.8.0 pages, and the README now labels them that way.

🤖 Generated with Claude Code

yawkat and others added 2 commits September 25, 2026 18:47
Describe the fork as the maintained continuation of lz4/lz4-java, add
Gradle coordinates and supported native platforms, recommend the safe
decompressor and frame streams, modernize the examples, and add security,
build and license sections. The version is omitted in favor of a Maven
Central badge so it doesn't go stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Document how to report bugs, request features and contribute, including
the requirements for acceptable contributions, as required by the
OpenSSF Best Practices criteria.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yawkat yawkat added this to the 1.11.4 milestone Sep 25, 2026
Run OpenSSF Scorecard weekly and on pushes to main, publishing results
for the README badge. Record JaCoCo coverage in a new coverage profile
on the Linux amd64 test job and upload it to Codecov via OIDC. Add the
Codecov, OpenSSF Best Practices and Scorecard badges to the README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yawkat yawkat changed the title Rework README Rework README, add contributing guide, Scorecard and coverage Sep 25, 2026
yawkat and others added 2 commits September 25, 2026 19:13
This repository is itself a GitHub fork, so head.repo.fork is always
true and OIDC was never used. Compare the head repository instead, and
only upload the JaCoCo report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@yawkat
yawkat merged commit e0178d2 into main Sep 25, 2026
3 checks passed
@yawkat
yawkat deleted the claude/readme-update-22ef1b branch September 25, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants