#leb128 #no-std

no-std leb128-u64

Extremely minimal and simple LEB128 u64 encoding/decoding

2 releases

0.1.1 May 8, 2023
0.1.0 May 8, 2023

#2278 in Encoding

Download history 58/week @ 2024-03-14 56/week @ 2024-03-21 87/week @ 2024-03-28 34/week @ 2024-04-04 85/week @ 2024-04-11 159/week @ 2024-04-18 43/week @ 2024-04-25 24/week @ 2024-05-02 58/week @ 2024-05-09 102/week @ 2024-05-16 101/week @ 2024-05-23 117/week @ 2024-05-30 99/week @ 2024-06-06 103/week @ 2024-06-13 69/week @ 2024-06-20 27/week @ 2024-06-27

319 downloads per month

MIT license

5KB
66 lines

leb128-u64

Extremely minimal and simple LEB128 u64 encoding/decoding.

Cargo Documentation License

Example

let input: u64 = 42;
let mut buf = Vec::new();
leb128_u64::encode(input, &mut buf);
assert_eq!(leb128_u64::encoded_len(input), buf.len());

let output = leb128_u64::decode(&buf[..]);
assert_eq!(input, output);

Dependencies

~170KB