-
Notifications
You must be signed in to change notification settings - Fork 13
feat: add rebuild from existing function #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CodSpeed Performance ReportMerging #84 will not alter performanceComparing Summary
|
lwwmanning
reviewed
Mar 14, 2025
lwwmanning
approved these changes
Mar 14, 2025
1c9b08d to
70865a4
Compare
Contributor
Author
034256c to
bb04f95
Compare
bb04f95 to
187c4b5
Compare
Merged
a10y
pushed a commit
that referenced
this pull request
Mar 17, 2025
## 🤖 New release * `fsst-rs`: 0.5.1 -> 0.5.2 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.5.2](v0.5.1...v0.5.2) - 2025-03-17 ### Added - add rebuild from existing function ([#84](#84)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This was referenced Mar 17, 2025
a10y
added a commit
to vortex-data/vortex
that referenced
this pull request
Mar 17, 2025
The previous implementation of FSST comparison pushdown relied on rebuilding a compressor by reinserting symbols one-by-one into the CompressorBuilder, and then building it. That doesn't work, for reasons described in the description at spiraldb/fsst#84. We use the new `rebuild_from` API on fsst compressor to build a new compressor that is guaranteed to preserve symbol table ordering, and thus guarantee equal compression outputs.
a1412744807
added a commit
to a1412744807/rs-fsst
that referenced
this pull request
Oct 27, 2025
## 🤖 New release * `fsst-rs`: 0.5.1 -> 0.5.2 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.5.2](spiraldb/fsst@v0.5.1...v0.5.2) - 2025-03-17 ### Added - add rebuild from existing function ([#84](spiraldb/fsst#84)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Goodbai-1206
added a commit
to Goodbai-1206/fsst-rs
that referenced
this pull request
Oct 29, 2025
## 🤖 New release * `fsst-rs`: 0.5.1 -> 0.5.2 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.5.2](spiraldb/fsst@v0.5.1...v0.5.2) - 2025-03-17 ### Added - add rebuild from existing function ([#84](spiraldb/fsst#84)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
akkjs887
added a commit
to akkjs887/rt-rsst
that referenced
this pull request
Oct 29, 2025
## 🤖 New release * `fsst-rs`: 0.5.1 -> 0.5.2 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.5.2](spiraldb/fsst@v0.5.1...v0.5.2) - 2025-03-17 ### Added - add rebuild from existing function ([#84](spiraldb/fsst#84)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
yelirekhmon
added a commit
to yelirekhmon/fstrs
that referenced
this pull request
Oct 30, 2025
## 🤖 New release * `fsst-rs`: 0.5.1 -> 0.5.2 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.5.2](spiraldb/fsst@v0.5.1...v0.5.2) - 2025-03-17 ### Added - add rebuild from existing function ([#84](spiraldb/fsst#84)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

It's useful to be able to rebuild a Compressor from an existing symbol table. For example, if you want to perform incremental compression, or compress a value to pushdown comparisons over the encoded data.
Going through
CompressorBuilder, callinginsertfor each symbol andbuilding may seem appropriate, but you're not guaranteed to get the same codes order afterward! This is because of thefinalizestep, many of the 2-byte codes will actually get reordered. This is an optimization we port from the C++ code, and allows us to skip a hashtable lookup during compression for many inputs.To avoid the ambiguity, we provide a new
Compressor::rebuild_fromto rebuild from a slice of symbols and lens. This repopulates thecodes_two_byteand hash table that are needed at compress time, and does so without the finalize step that occurs when going through the CompressorBuilder.I've also gone and updated the fuzzer to check both a freshly built and a rebuilt compressor. It caught several bugs as I was going through cleaning up this PR 😅 I let the fuzzer run for 30 minutes on my laptop and it didn't find anything.