Expand description
Python bindings for packing, unpacking, counting, and encoding bitstreams.
Structsยง
Functionsยง
- __
pyfunction_ ๐ โbatch_ encode - __
pyfunction_ ๐ โbatch_ encode_ numpy - __
pyfunction_ ๐ โpack_ bitstream - __
pyfunction_ ๐ โpack_ bitstream_ numpy - __
pyfunction_ ๐ โpopcount - __
pyfunction_ ๐ โpopcount_ numpy - __
pyfunction_ ๐ โunpack_ bitstream - __
pyfunction_ ๐ โunpack_ bitstream_ numpy - batch_
encode ๐ - Bernoulli-encode a numpy float64 array into packed bitstream words.
- batch_
encode_ ๐numpy - Bernoulli-encode a numpy float64 array into a 2-D numpy uint64 array.
- pack_
bitstream ๐ - Pack a one- or two-dimensional Python bit sequence into 64-bit words.
- pack_
bitstream_ ๐numpy - Pack a 1-D numpy uint8 array into packed u64 words, returning a numpy array. Zero-copy input, single-allocation output.
- popcount ๐
- Count set bits in a one- or two-dimensional collection of packed words.
- popcount_
numpy ๐ - Popcount on a numpy uint64 array โ zero-copy input.
- register ๐
- Register bitstream bindings without adding implementation code to the crate root.
- unpack_
bitstream ๐ - Unpack 64-bit words into their original one- or two-dimensional bit shape.
- unpack_
bitstream_ ๐numpy - Unpack a numpy uint64 array back to a numpy uint8 array.