pub fn vlu_encode(&mut self, mut value: u64) -> &WasmEncoder {
        // first group of 7 bits
        // 1st byte encodes 0 as positive in bit 6
        let mut b = value as u8;
        value >>= 7;

        // keep shifting until all bits are done
        while value != 0 {
            // emit with continuation bit
            self.buf.push(b | 0x80);

            // next group of 7 bits
            b = value as u8;
            value >>= 7;
        }

        // emit without continuation bit
        self.buf.push(b);
        self
    }
// encodes an uint64 into the byte buffer
// note that these are encoded using vlu encoding to conserve space
// vlu (variable length unsigned) encoder
encodes an uint64 into the byte buffer
note that these are encoded using vlu encoding to conserve space
vlu (variable length unsigned) encoder
encodes an uint64 into the byte buffer note that these are encoded using vlu encoding to conserve space vlu ( variable length unsigned ) encoder
pub fn vlu_encode(&mut self, mut value: u64) -> &WasmEncoder {
        // first group of 7 bits
        // 1st byte encodes 0 as positive in bit 6
        let mut b = value as u8;
        value >>= 7;
        // keep shifting until all bits are done
        while value != 0 {
            // emit with continuation bit
            self.buf.push(b | 0x80);
            // next group of 7 bits
            b = value as u8;
            value >>= 7;
        }
        // emit without continuation bit
        self.buf.push(b);
        self
    }
pub fn vlu_encode ( & mut self , mut value : u64 ) -> & WasmEncoder { // first group of 7 bits // 1st byte encodes 0 as positive in bit 6 let mut b = value as u8 ; value >>= 7 ; // keep shifting until all bits are done while value != 0 { // emit with continuation bit self . buf . push ( b | 0x80 ) ; // next group of 7 bits b = value as u8 ; value >>= 7 ; } // emit without continuation bit self . buf . push ( b ) ; self }
encodes an uint64 into the byte buffer
note that these are encoded using vlu encoding to conserve space
vlu (variable length unsigned) encoder
encodes an uint64 into the byte buffer note that these are encoded using vlu encoding to conserve space vlu ( variable length unsigned ) encoder
&mut self
value
u64