/// Add a number in the output stream
///
/// Numbers are encoded on one or two bytes, according to their value.
Add a number in the output stream
Numbers are encoded on one or two bytes, according to their value.
Add a number in the output stream Numbers are encoded on one or two bytes according to their value .
fn write_int(int: u32, out: &mut Vec<u8>) {
    if int < 0x80 {
        out.push(int as u8);
    } else {
        out.push(0x80 | (int & 0x7f) as u8);
        out.push((int >> 7) as u8);
    }
}
fn write_int ( int : u32 , out : & mut Vec < u8 > ) { if int < 0x80 { out . push ( int as u8 ) ; } else { out . push ( 0x80 | ( int & 0x7f ) as u8 ) ; out . push ( ( int >> 7 ) as u8 ) ; } }
Add a number in the output stream
Numbers are encoded on one or two bytes, according to their value.
Add a number in the output stream Numbers are encoded on one or two bytes according to their value .
int
u32
out
&mut Vec<u8>