Skip to main content

pad_bytes_u64

Function pad_bytes_u64 

Source
pub fn pad_bytes_u64<const ALIGN: u64>(n: u64) -> u64
Expand description

Returns the number of padding bytes needed to align n to ALIGN (u64 version).

use lance_core::utils::bit::pad_bytes_u64;

assert_eq!(pad_bytes_u64::<8>(0), 0);
assert_eq!(pad_bytes_u64::<8>(1), 7);
assert_eq!(pad_bytes_u64::<8>(8), 0);
assert_eq!(pad_bytes_u64::<8>(9), 7);