-
Notifications
You must be signed in to change notification settings - Fork 7
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
Decode into an uninitialized byte slice #63
Conversation
src/lib.rs
Outdated
pub fn decompressed_capacity(&self, compressed: &[u8]) -> usize { | ||
size_of::<Symbol>() * (compressed.len() + 1) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should call this max_decompression_capacity
. it's an upper-bound since symbols need not be 8 bytes (and most of them time they'll be <= 3bytes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep fair, although the check is that the slice must be == this capacity. We could make it <=, but would require a bounds check inside each iteration which feels... slow
## 🤖 New release * `fsst-rs`: 0.4.3 -> 0.4.4 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.4.4](v0.4.3...v0.4.4) - 2024-12-30 ### Added - add dbtext decompression benchmark (#44) ### Other - Decode into an uninitialized byte slice ([#63](#63)) - *(deps)* lock file maintenance (#62) - *(deps)* lock file maintenance (#60) - *(deps)* lock file maintenance (#59) - *(deps)* update mozilla-actions/sccache-action action to v0.0.7 (#58) - *(deps)* lock file maintenance (#57) - *(deps)* lock file maintenance (#56) - *(deps)* lock file maintenance (#55) - *(deps)* lock file maintenance (#54) - *(deps)* lock file maintenance (#53) - *(deps)* lock file maintenance (#50) - *(deps)* lock file maintenance (#49) - *(deps)* lock file maintenance (#47) - *(deps)* lock file maintenance (#46) </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>
Fixes #61