fn encode_crc(crc: u32) -> Vec<u8> {
    let mut crc = crc;
    // Force little endian
    let mut buf = Vec::with_capacity(3);
    for _ in 0..3 { // NB Only encode 24 bits
        buf.push((crc & 0xff) as u8);
        crc >>= 8;
    }
    buf
}
// 5 bits per encoded char * 4 = 20 bits
5 bits per encoded char * 4 = 20 bits
5 bits per encoded char * 4 = 20 bits
fn encode_crc(crc: u32) -> Vec<u8> {
    let mut crc = crc;
    // Force little endian
    let mut buf = Vec::with_capacity(3);
    for _ in 0..3 { // NB Only encode 24 bits
        buf.push((crc & 0xff) as u8);
        crc >>= 8;
    }
    buf
}
fn encode_crc ( crc : u32 ) -> Vec < u8 > { let mut crc = crc ; // Force little endian let mut buf = Vec :: with_capacity ( 3 ) ; for _ in 0 .. 3 { // NB Only encode 24 bits buf . push ( ( crc & 0xff ) as u8 ) ; crc >>= 8 ; } buf }
5 bits per encoded char * 4 = 20 bits
5 bits per encoded char * 4 = 20 bits
crc
u32
crc
u32