fn pad_to_alignment(alignment: u8, len: usize) -> usize
Calculate an alignment boundary and return the number of bytes needed to pad to the alignment boundary