| 1 |
# Heap-Allocated, Fixed-Size, Bit Buffer |
| 2 |
|
| 3 |
This module defines an analogue to `Box<[bool]>`, as `Box<BitSlice>` cannot be |
| 4 |
constructed or used in any way. Like `Box<[T]>`, this is a heap allocation that |
| 5 |
can modify its contents, but cannot resize the collection. The `BitBox` value is |
| 6 |
an owning [`*BitSlice`] pointer, and can be used to access its contents without |
| 7 |
any decoding. |
| 8 |
|
| 9 |
You should generally prefer [`BitVec`] or [`BitArray`]; however, very large |
| 10 |
`BitArrays` are likely better served being copied into a `BitBox` rather than |
| 11 |
being boxed themselves when moved into the heap. |
| 12 |
|
| 13 |
[`BitArray`]: crate::array::BitArray |
| 14 |
[`BitVec`]: crate::vec::BitVec |
| 15 |
[`*BitSlice`]: crate::slice::BitSlice |