Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
a10y committed Aug 16, 2024
1 parent fd0d817 commit ac874f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions encodings/fsst/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Vortex FSST

A Vortex Encoding for Binary and Utf8 data that utilizes the [Fast Static Symbol Table](https://github.com/spiraldb/fsst)
compression algorithm.
4 changes: 2 additions & 2 deletions encodings/fsst/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ impl FSSTArray {
// a code.
//
// The `codes` array is a Binary array where each binary datum is a sequence of 8-bit codes.
// Each code corresponds either to an offset in the `symbols` table, or to the "escape code",
// Each code corresponds either to a symbol, or to the "escape code",
// which tells the decoder to emit the following byte without doing a table lookup.
pub fn try_new(dtype: DType, symbols: Array, codes: Array) -> VortexResult<Self> {
// Check: symbols must be a u64 array
if symbols.dtype() != &DType::Primitive(PType::U64, Nullability::NonNullable) {
vortex_bail!(InvalidArgument: "symbols array must be of type u64")
}

// Check: symbols must not have length > 255
// Check: symbols must not have length > MAX_CODE
if symbols.len() > MAX_CODE as usize {
vortex_bail!(InvalidArgument: "symbols array must have length <= 255")
}
Expand Down

0 comments on commit ac874f5

Please sign in to comment.