diff options
| author | mat <git@matdoes.dev> | 2025-05-31 23:14:59 -0600 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-05-31 23:14:59 -0600 |
| commit | b103e6fdc0daa131d1177c5d0705134640aa9d6e (patch) | |
| tree | ebaa895c98865e4e394f040c45afbcb09d64f592 /azalea-core/src | |
| parent | 0a7648ce483737a665377a7be84f14f8bd98a9c9 (diff) | |
| download | azalea-drasl-b103e6fdc0daa131d1177c5d0705134640aa9d6e.tar.xz | |
doc updates
Diffstat (limited to 'azalea-core/src')
| -rw-r--r-- | azalea-core/src/bitset.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/azalea-core/src/bitset.rs b/azalea-core/src/bitset.rs index ccc43ba0..1cac4a9c 100644 --- a/azalea-core/src/bitset.rs +++ b/azalea-core/src/bitset.rs @@ -124,14 +124,15 @@ impl From<Vec<u8>> for BitSet { } } -/// A list of bits with a known fixed size. +/// A compact fixed-size array of bits. /// -/// The `N` is the number of bytes reserved for the bitset. You're encouraged to +/// The `N` is the number of bits reserved for the bitset. You're encouraged to /// use it like `FixedBitSet<20>` if you need 20 bits. /// -/// Note that this is primarily meant for fast serialization and deserialization -/// for Minecraft. An alternative that would be ~20% faster for accessing data -/// could store it interally as `usize`s instead of `u8`s. +/// Note that this is optimized for fast serialization and deserialization for +/// Minecraft, and may not be as performant as it could be for other purposes. +/// Notably, the internal representation is an array of `u8`s even though +/// `usize` would be slightly faster. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct FixedBitSet<const N: usize> where |
