Decodes a VoxjSerdeFile (encoded .voxj blocks) into a VoxjCodecFile
(decoded geometry), the inverse of encode_voxj_file. Each
object’s palette cell counts come from the palettes it references; the
palettes, hierarchy, roots, and ext carry over unchanged.
Decodes one VoxjSerdeObject back into a VoxjCodecObject, the inverse of
encode_voxj_object. cell_counts[p] is the cell count
of the palette referenced by object.palette_refs[p], needed to recover the
bit width of packed-base64 samples;
voxj_palette_cell_counts computes it from the
document’s palettes.
Encodes a VoxjCodecFile (decoded geometry) into a VoxjSerdeFile
(encoded .voxj blocks) with fixed position and sample encodings, ready to
serialize with to_voxj_file_bytes. Each object’s palette
cell counts come from the palettes it references; the palettes, hierarchy,
roots, and ext carry over unchanged.
Encodes a VoxjCodecFile (decoded geometry) into a VoxjSerdeFile
(encoded .voxj blocks), choosing each object’s block encodings by the
smallest-deflated search (encode_voxj_object_smallest).
The canonical shipping form. Each object’s palette cell counts come from the
palettes it references; the palettes, hierarchy, roots, and ext carry over
unchanged.
Encodes one VoxjCodecObject’s geometry into a VoxjSerdeObject with the
given fixed position and sample encodings. cell_counts[p] is the cell count
of the palette referenced by object.palette_refs[p], used to derive the bit
width of packed-base64 samples;
voxj_palette_cell_counts computes it from the
document’s palettes.
Encodes one VoxjCodecObject’s geometry into a VoxjSerdeObject, trying every
applicable non-raw encoding pairing, deflating each, and keeping the
smallest. The canonical shipping form. cell_counts[p] is the cell count of
the palette referenced by object.palette_refs[p];
voxj_palette_cell_counts computes it from the
document’s palettes.
The cell count of each referenced palette, in palette_refs order, ready to
pass as the cell_counts argument of encode_voxj_object
and decode_voxj_object. A ref that points outside
palettes contributes 0.