pub fn remove_trailing_zeroes(data: &[u8]) -> usize
Removes the trailing zeroes in the payload
There must always be at least one remaining byte even if it is a zero byte.