MCPcopy Create free account
hub / github.com/Vulae/pkmc / packed_size

Method packed_size

pkmc-util/src/packed_array.rs:60–65  ·  view source on GitHub ↗

Get number of values for the u64 array from the bits_per_entry and num_entries.

(bits_per_entry: u8, num_entries: usize)

Source from the content-addressed store, hash-verified

58
59 /// Get number of values for the u64 array from the bits_per_entry and num_entries.
60 pub const fn packed_size(bits_per_entry: u8, num_entries: usize) -> usize {
61 u64::div_ceil(
62 num_entries as u64,
63 (u64::BITS / bits_per_entry as u32) as u64,
64 ) as usize
65 }
66
67 /// New empty PackedArray
68 pub fn new(bits_per_entry: u8, num_entries: usize) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected