Skip to content

Commit 3b1c590

Browse files
docs(vortex-onpair): clarify codes_ptype U8 narrowing condition
The codes slot narrows to U8 only when dict_size is exactly 256, which is also the minimum size for a valid (complete) OnPair dictionary. The prior "at most 256 tokens" phrasing implied a range below 256 that can never occur. Signed-off-by: Francesco Gargiulo <francesco@spiraldb.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2a86d43 commit 3b1c590

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • encodings/experimental/onpair/src

encodings/experimental/onpair/src/array.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ pub struct OnPairMetadata {
7777
/// narrowed to U16/U8 by the cascading compressor when values fit).
7878
#[prost(enumeration = "PType", tag = "5")]
7979
pub dict_offsets_ptype: i32,
80-
/// PType of the `codes` slot child (typically U16, may be narrowed to U8
81-
/// when the dictionary has at most 256 tokens).
80+
/// PType of the `codes` slot child (typically U16; U8 only when the
81+
/// dictionary has exactly 256 tokens — its minimum, since a valid OnPair
82+
/// dictionary must contain all 256 single-byte tokens, so codes then fit
83+
/// in 8 bits).
8284
#[prost(enumeration = "PType", tag = "6")]
8385
pub codes_ptype: i32,
8486
/// PType of the `codes_offsets` slot child.

0 commit comments

Comments
 (0)