5 releases (3 breaking)
|0.3.0||Sep 20, 2022|
|0.2.0||Sep 16, 2022|
|0.1.1||Sep 14, 2022|
|0.1.0||Sep 14, 2022|
|0.0.1||Sep 14, 2022|
#1561 in Magic Beans
16,145 downloads per month
Used in 9 crates (4 directly)
This small utility crate provides two separate things:
Bitstype that can be SCALE encoded and decoded, and is fully SCALE compatible with a
BitVec<u8, Lsb0>. It's a deliberately simple type that is conceptually just a sequence of bools, and can be used as a replacement for
BitVecwhen you don't need the additional complexity and functionality that it comes with. See the
bitsmodule for more.
- Utility methods to help encode and decode arbitrary bit sequences from their
SCALE representation, or skip over the corresponding bytes entirely, with zero
allocations. These bypass the need to first go via some
BitVecwith the right store/order type, and are WASM compatible (unlike
u64store type). See the
scalemodule for more.
These things play nicely together (ie you can encode and decode arbitrary bit
sequences directly into the
Bits type), but don't need to be used together.