fn decode_binary_long(&self, bytes: Vec<u8>) -> Value {
        // BigInt::from_bytes_le doesn't like a sign bit in the bytes, therefore
        // we have to extract that ourselves and do the two-s complement.
        let negative = !bytes.is_empty() && (bytes[bytes.len() - 1] & 0x80 != 0);
        let mut val = BigInt::from_bytes_le(Sign::Plus, &bytes);
        if negative {
            val -= BigInt::from(1) << (bytes.len() * 8);
        }
        Value::Int(val)
    }
// Decode a binary-encoded long integer.
Decode a binary-encoded long integer.
Decode a binary - encoded long integer .
fn decode_binary_long(&self, bytes: Vec<u8>) -> Value {
        // BigInt::from_bytes_le doesn't like a sign bit in the bytes, therefore
        // we have to extract that ourselves and do the two-s complement.
        let negative = !bytes.is_empty() && (bytes[bytes.len() - 1] & 0x80 != 0);
        let mut val = BigInt::from_bytes_le(Sign::Plus, &bytes);
        if negative {
            val -= BigInt::from(1) << (bytes.len() * 8);
        }
        Value::Int(val)
    }
fn decode_binary_long ( & self , bytes : Vec < u8 > ) -> Value { // BigInt::from_bytes_le doesn't like a sign bit in the bytes, therefore // we have to extract that ourselves and do the two-s complement. let negative = ! bytes . is_empty ( ) && ( bytes [ bytes . len ( ) - 1 ] & 0x80 != 0 ) ; let mut val = BigInt :: from_bytes_le ( Sign :: Plus , & bytes ) ; if negative { val -= BigInt :: from ( 1 ) << ( bytes . len ( ) * 8 ) ; } Value :: Int ( val ) }
Decode a binary-encoded long integer.
Decode a binary - encoded long integer .
&self
bytes
Vec<u8>
&self
bytes
Vec<u8>