Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Decode into an uninitialized byte slice#63

Merged
gatesn merged 4 commits into
developfrom
ngates/decode-into
Dec 30, 2024
Merged

Decode into an uninitialized byte slice#63
gatesn merged 4 commits into
developfrom
ngates/decode-into

Conversation

@gatesn

@gatesn gatesn commented Dec 30, 2024

Copy link
Copy Markdown
Contributor

Fixes #61

@gatesn gatesn requested a review from lwwmanning December 30, 2024 18:47
@gatesn gatesn enabled auto-merge (squash) December 30, 2024 19:11
Comment thread src/lib.rs Outdated
Comment on lines +255 to +257
pub fn decompressed_capacity(&self, compressed: &[u8]) -> usize {
size_of::<Symbol>() * (compressed.len() + 1)
}

Copy link
Copy Markdown
Contributor

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)

Copy link
Copy Markdown
Contributor Author

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

@gatesn gatesn merged commit 11eec59 into develop Dec 30, 2024
@gatesn gatesn deleted the ngates/decode-into branch December 30, 2024 20:03
@github-actions github-actions Bot mentioned this pull request Dec 30, 2024
gatesn pushed a commit that referenced this pull request Dec 30, 2024
## 🤖 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>
a1412744807 added a commit to a1412744807/rs-fsst that referenced this pull request Oct 27, 2025
## 🤖 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](spiraldb/fsst@v0.4.3...v0.4.4) -
2024-12-30

### Added

- add dbtext decompression benchmark (#44)

### Other

- Decode into an uninitialized byte slice
([#63](spiraldb/fsst#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>
Goodbai-1206 added a commit to Goodbai-1206/fsst-rs that referenced this pull request Oct 29, 2025
## 🤖 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](spiraldb/fsst@v0.4.3...v0.4.4) -
2024-12-30

### Added

- add dbtext decompression benchmark (#44)

### Other

- Decode into an uninitialized byte slice
([#63](spiraldb/fsst#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>
akkjs887 added a commit to akkjs887/rt-rsst that referenced this pull request Oct 29, 2025
## 🤖 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](spiraldb/fsst@v0.4.3...v0.4.4) -
2024-12-30

### Added

- add dbtext decompression benchmark (#44)

### Other

- Decode into an uninitialized byte slice
([#63](spiraldb/fsst#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>
yelirekhmon added a commit to yelirekhmon/fstrs that referenced this pull request Oct 30, 2025
## 🤖 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](spiraldb/fsst@v0.4.3...v0.4.4) -
2024-12-30

### Added

- add dbtext decompression benchmark (#44)

### Other

- Decode into an uninitialized byte slice
([#63](spiraldb/fsst#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>
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.

Add support to decode into vortex-buffer

2 participants