#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

#2169 in Encoding

Download history 78/week @ 2024-07-29 85/week @ 2024-08-05 84/week @ 2024-08-12 77/week @ 2024-08-19 76/week @ 2024-08-26 76/week @ 2024-09-02 85/week @ 2024-09-09 39/week @ 2024-09-16 24/week @ 2024-09-23 7/week @ 2024-09-30 38/week @ 2024-10-07 13/week @ 2024-10-14 8/week @ 2024-10-21 24/week @ 2024-11-04 75/week @ 2024-11-11

108 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

~175KB