Skip to content

Commit 5703ad6

Browse files
authored
Upgrade FSST (#2674)
1 parent dd587bf commit 5703ad6

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fastlanes = "0.1.8"
9292
flatbuffers = "25"
9393
flexbuffers = "25"
9494
flume = "0.11"
95-
fsst-rs = "0.5.0"
95+
fsst-rs = "0.5.1"
9696
futures = { version = "0.3.31", default-features = false }
9797
futures-executor = "0.3.31"
9898
futures-util = "0.3.31"

encodings/fsst/src/canonical.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,9 @@ fn fsst_into_varbin_view(
5959

6060
// Bulk-decompress the entire array.
6161
let mut uncompressed_bytes = ByteBufferMut::with_capacity(total_size + 7);
62-
// SAFETY: uncompressed bytes is large enough to contain all data + the 7 additional bytes
63-
// of padding required for vectorized decompression. See the docstring for `decompress_into`
64-
// for more details.
65-
unsafe {
66-
let len =
67-
decompressor.decompress_into(bytes.as_slice(), uncompressed_bytes.spare_capacity_mut());
68-
uncompressed_bytes.set_len(len);
69-
};
62+
let len =
63+
decompressor.decompress_into(bytes.as_slice(), uncompressed_bytes.spare_capacity_mut());
64+
unsafe { uncompressed_bytes.set_len(len) };
7065

7166
let block_offset = u32::try_from(block_offset)?;
7267

0 commit comments

Comments
 (0)