fn encode_int(i: i32, buffer: &mut Vec<u8>)