ZXC 0.15.0
High-performance asymmetric lossless compression library
Loading...
Searching...
No Matches
zxc_pivco_tree_t Struct Reference

A PivCo code tree: its canonical shape, by depth. More...

#include <zxc_internal.h>

Data Fields

uint16_t node_base [11+2]
 First node index of each depth.
 
uint16_t leaf_base [11+2]
 First syms index of each depth.
 
int16_t base [11+1]
 Node index of the d-bit prefix 0.
 
int max_depth
 
uint8_t syms [256]
 Leaf symbols, depth by depth.
 
uint8_t flat_d [((2 *256 - 1)+1)]
 Flat-root depth, 0, or ZXC_PIVCO_COVERED.
 

Detailed Description

A PivCo code tree: its canonical shape, by depth.

Canonical codes fix the tree from the leaf counts alone. Each depth holds its leaves, then its internal nodes; the k-th internal node's children are positions 2k and 2k+1 below. That is the wire order, so a node is a (depth, position) pair, and the d-bit prefix p is node base[d] + p.

Under a flat root the leaves sit in packed-code order, not symbol order: they are the decoder's code -> symbol table, and each leaf's code ends with its packed code.

Depth arrays cover 0 to max_depth; node_base and leaf_base also mark where the last depth ends. Node arrays cover every node and the slot.

Definition at line 779 of file zxc_internal.h.

Field Documentation

◆ base

int16_t zxc_pivco_tree_t::base[11+1]

Node index of the d-bit prefix 0.

Definition at line 782 of file zxc_internal.h.

◆ flat_d

uint8_t zxc_pivco_tree_t::flat_d[((2 * 256 - 1)+1)]

Flat-root depth, 0, or ZXC_PIVCO_COVERED.

Definition at line 785 of file zxc_internal.h.

◆ leaf_base

uint16_t zxc_pivco_tree_t::leaf_base[11+2]

First syms index of each depth.

Definition at line 781 of file zxc_internal.h.

◆ max_depth

int zxc_pivco_tree_t::max_depth

Definition at line 783 of file zxc_internal.h.

◆ node_base

uint16_t zxc_pivco_tree_t::node_base[11+2]

First node index of each depth.

Definition at line 780 of file zxc_internal.h.

◆ syms

uint8_t zxc_pivco_tree_t::syms[256]

Leaf symbols, depth by depth.

Definition at line 784 of file zxc_internal.h.


The documentation for this struct was generated from the following file: