Skip to main content

decode_voxj_object

Function decode_voxj_object 

Source
pub fn decode_voxj_object(
    object: &VoxjSerdeObject,
    cell_counts: &[usize],
) -> Result<VoxjCodecObject>
Expand description

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.

Bitmap and Hilbert positions decode in ascending cell / Hilbert-index order; the sample channels share that same order, so each returned positions[k] pairs with samples[k].