#byte-sequences #integer #number #numbers #most #uint #zig-zag

no-std uint-zigzag

Uint is a convenience wrapper for zig-zag encoding integers to byte sequences. This allows better compression since the majority of numbers are quite small resulting in 1 or 2 bytes in the most common case vs 4 for 32-bit numbers or 8 for 64-bit numbers. This also permits the user to not have to think about which integer type is the most efficient to compress

3 unstable releases

0.2.1 Oct 20, 2022
0.2.0 Sep 13, 2022
0.1.0 Aug 15, 2022

#441 in Compression

Download history 168/week @ 2023-11-19 103/week @ 2023-11-26 214/week @ 2023-12-03 177/week @ 2023-12-10 194/week @ 2023-12-17 98/week @ 2023-12-24 113/week @ 2023-12-31 261/week @ 2024-01-07 294/week @ 2024-01-14 286/week @ 2024-01-21 347/week @ 2024-01-28 286/week @ 2024-02-04 344/week @ 2024-02-11 265/week @ 2024-02-18 234/week @ 2024-02-25 362/week @ 2024-03-03

1,211 downloads per month
Used in 4 crates (3 directly)

Apache-2.0 OR MIT

18KB
375 lines

Crate Docs Apache 2.0

Uint-ZigZag

Uint-zigzag is a convenience wrapper for zig-zag encoding integers to byte sequences.

This allows better compression since the majority of numbers are quite small resulting in 1 or 2 bytes in the most common case vs 4 for 32-bit numbers or 8 for 64-bit numbers.

This also permits the user to not have to think about which integer type is the most efficient to compress.

This crate is passively maintained.


lib.rs:

Uint is a convenience wrapper for zig-zag encoding integers to byte sequences.

This allows better compression since the majority of numbers are quite small resulting in 1 or 2 bytes in the most common case vs 4 for 32-bit numbers or 8 for 64-bit numbers.

This also permits the user to not have to think about which value is the most efficient to compress.

Dependencies

~300–620KB
~10K SLoC