Skip to main content

shape

Function shape 

Source
pub fn shape(bytes: &[u8]) -> Result<Vec<Kind>>
Expand description

The kind at every level of an encoded chunk, in the order the encoder chose them.

The order is the one encode_with asks its chooser in: a level, then everything under its first inner chunk, then everything under its second. So a chooser that hands these back one per question gets the same cascade on a chunk that offers the same kinds, without searching any of it. That is what a writer with many small parts of one column wants, because the search is most of what the encode costs and neighbouring parts nearly always come out the same shape.

ยงErrors

As decode.