Module bit_packed_vector

Module bit_packed_vector 

Source
Expand description

Implements BitPackedVector, a version of an immutable vector optimized for storing field elements compactly.

Structs§

BitPackedIterator
Iterator for a BitPackedVector. See BitPackedVector::iter for generating one.
BitPackedVector 🔒
A space-efficient representation of an immutable vector of prime field elements. Particularly useful when all elements have values close to each other. It provides an interface similar to that of a Vec.

Functions§

num_bits
Returns the minimum numbers of bits required to represent prime field elements in the range [0, n]. This is equivalent to computing ceil(log_2(n+1)).