Skip to content

Conversation

@klauspost
Copy link
Owner

@klauspost klauspost commented Mar 17, 2025

I have taken the experiences from this library and created a backwards compatible compression package called MinLZ.

That package will seamlessly decode S2 content, making the transition from this package fairly trivial.

There are many improvements to pretty much all aspects of S2 since we have "broken free" of the Snappy format specification. You can read a writeup on Design and Improvements over S2.

The only aspect not covered is custom dictionary encoding. While I do intend to fix errors in this package, I do not expect to make significant improvements, since I consider MinLZ a better basis for going forward.

See https://github.com/minio/minlz for all details.

Summary by CodeRabbit

  • Documentation
    • Added a new section introducing MinLZ, a new compression package that is backwards compatible with the existing S2 library.
    • The update provides a concise overview of improvements in decoding and links to detailed design insights and repository information for future development.

I have taken the experiences from this library and created a backwards compatible compression package called MinLZ.

That package will seamlessly decode S2 content, making the transition from this package fairly trivial.

There are many improvements to pretty much all aspects of S2 since we have "broken free" of the Snappy format specification.
You can read a writeup on [Design and Improvements over S2](https://gist.github.com/klauspost/a25b66198cdbdf7b5b224f670c894ed5).

The only aspect not covered is custom dictionary encoding. While I do intend to fix errors in this package,
I do not expect to make significant improvements, since I consider MinLZ a better basis for going forward.

See https://github.com/minio/minlz for all details.
@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2025

📝 Walkthrough

Walkthrough

The pull request updates the s2/README.md file by adding a new section titled "MinLZ." This section describes a newly introduced compression package, MinLZ, which is backwards compatible with the existing S2 library and capable of seamlessly decoding S2 content. The update includes links to a design write-up and the MinLZ GitHub repository for further context, while leaving the existing S2 compression details unchanged.

Changes

File Summary of Changes
s2/README.md Added a new "MinLZ" section at the beginning to describe a new compression package, its compatibility with S2, and relevant external links.

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
s2/README.md (3)

3-3: Hyphenate Compound Adjective

In the sentence "I have taken the experiences from this library and created a backwards compatible compression package called MinLZ," the compound adjective should be hyphenated. Consider changing "backwards compatible" to "backwards-compatible" for improved clarity and adherence to style guidelines.

-I have taken the experiences from this library and created a backwards compatible compression package called MinLZ.
+I have taken the experiences from this library and created a backwards-compatible compression package called MinLZ.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~3-~3: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...riences from this library and created a backwards compatible compression package called MinLZ. That...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


7-7: Refine Informal Language

The phrase "pretty much" in "There are many improvements to pretty much all aspects of S2 since we have 'broken free' of the Snappy format specification." is somewhat informal. Consider removing or replacing it (e.g., "There are many improvements to all aspects of S2...") for a more professional tone.

🧰 Tools
🪛 LanguageTool

[style] ~7-~7: The phrase ‘pretty much’ can be informal. To strengthen your writing, consider removing it or replacing it with an adverb.
Context: ...rivial. There are many improvements to pretty much all aspects of S2 since we have "broken...

(PRETTY_MUCH)


13-13: Convert Bare URL to Markdown Link

Line 13 uses a bare URL ("See https://github.com/minio/minlz for all details."). Converting it to a Markdown link will enhance readability and consistency with the rest of the document.

-See https://github.com/minio/minlz for all details. 
+See [MinLZ details](https://github.com/minio/minlz) for all details.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

13-13: Bare URL used
null

(MD034, no-bare-urls)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 29a7d27 and 8eddfea.

📒 Files selected for processing (1)
  • s2/README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
s2/README.md

[uncategorized] ~3-~3: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...riences from this library and created a backwards compatible compression package called MinLZ. That...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[style] ~7-~7: The phrase ‘pretty much’ can be informal. To strengthen your writing, consider removing it or replacing it with an adverb.
Context: ...rivial. There are many improvements to pretty much all aspects of S2 since we have "broken...

(PRETTY_MUCH)

🪛 markdownlint-cli2 (0.17.2)
s2/README.md

13-13: Bare URL used
null

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms (15)
  • GitHub Check: fuzz-other (nounsafe)
  • GitHub Check: fuzz-other ("noasm,nounsafe")
  • GitHub Check: build (1.22.x, windows-latest)
  • GitHub Check: build (1.24.x, ubuntu-latest)
  • GitHub Check: build (1.23.x, macos-latest)
  • GitHub Check: build (1.24.x, macos-latest)
  • GitHub Check: build (1.24.x, windows-latest)
  • GitHub Check: build (1.23.x, ubuntu-latest)
  • GitHub Check: build-special
  • GitHub Check: build (1.23.x, windows-latest)
  • GitHub Check: fuzz-zstd (nounsafe)
  • GitHub Check: build (1.22.x, macos-latest)
  • GitHub Check: fuzz-s2 ("noasm,nounsafe")
  • GitHub Check: fuzz-s2 (nounsafe)
  • GitHub Check: build (1.22.x, ubuntu-latest)
🔇 Additional comments (1)
s2/README.md (1)

1-2: Section Header Clarity and Consistency

The new "MinLZ" header is clear and prominent. Please ensure its style (spacing, capitalization, etc.) aligns with other major section headers throughout the document.

@klauspost klauspost merged commit 520e81d into master Mar 18, 2025
22 checks passed
@klauspost klauspost deleted the s2-to-minlz branch March 18, 2025 10:35
hantang pushed a commit to qundao/mirror-forgejo that referenced this pull request Oct 21, 2025
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [github.com/klauspost/compress](https://github.com/klauspost/compress) | `v1.18.0` -> `v1.18.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fklauspost%2fcompress/v1.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fklauspost%2fcompress/v1.18.0/v1.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>klauspost/compress (github.com/klauspost/compress)</summary>

### [`v1.18.1`](https://github.com/klauspost/compress/releases/tag/v1.18.1)

[Compare Source](klauspost/compress@v1.18.0...v1.18.1)

#### What's Changed

- zstd: Fix incorrect buffer size in dictionary encodes by [@&#8203;klauspost](https://github.com/klauspost) in [#&#8203;1059](klauspost/compress#1059)
- s2: check for cap, not len of buffer in EncodeBetter/Best by [@&#8203;vdarulis](https://github.com/vdarulis) in [#&#8203;1080](klauspost/compress#1080)
- zstd: Add simple zstd EncodeTo/DecodeTo functions by [@&#8203;klauspost](https://github.com/klauspost) in [#&#8203;1079](klauspost/compress#1079)
- zlib: Avoiding extra allocation in zlib.reader.Reset by [@&#8203;travelpolicy](https://github.com/travelpolicy) in [#&#8203;1086](klauspost/compress#1086)
- gzhttp: remove redundant err check in zstdReader by [@&#8203;ryanfowler](https://github.com/ryanfowler) in [#&#8203;1090](klauspost/compress#1090)
- Run modernize. Deprecate Go 1.22 by [@&#8203;klauspost](https://github.com/klauspost) in [#&#8203;1095](klauspost/compress#1095)
- flate: Simplify matchlen by [@&#8203;klauspost](https://github.com/klauspost) in [#&#8203;1101](klauspost/compress#1101)
- flate: Add examples by [@&#8203;klauspost](https://github.com/klauspost) in [#&#8203;1102](klauspost/compress#1102)
- flate: Use exact sizes for huffman tables by [@&#8203;klauspost](https://github.com/klauspost) in [#&#8203;1103](klauspost/compress#1103)
- flate: Faster load+store by [@&#8203;klauspost](https://github.com/klauspost) in [#&#8203;1104](klauspost/compress#1104)
- Add notice to S2 about MinLZ by [@&#8203;klauspost](https://github.com/klauspost) in [#&#8203;1065](klauspost/compress#1065)

#### New Contributors

- [@&#8203;wooffie](https://github.com/wooffie) made their first contribution in [#&#8203;1069](klauspost/compress#1069)
- [@&#8203;vdarulis](https://github.com/vdarulis) made their first contribution in [#&#8203;1080](klauspost/compress#1080)
- [@&#8203;travelpolicy](https://github.com/travelpolicy) made their first contribution in [#&#8203;1086](klauspost/compress#1086)
- [@&#8203;ryanfowler](https://github.com/ryanfowler) made their first contribution in [#&#8203;1090](klauspost/compress#1090)

**Full Changelog**: <klauspost/compress@v1.18.0...v1.18.1>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTIuOSIsInVwZGF0ZWRJblZlciI6IjQxLjE1Mi45IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9786
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
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