#integer-compression #64-bit #32-bit #zig-zag #byte-sequences #unsigned-integer #majority #quite

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

#708 in Compression

Download history 1949/week @ 2025-08-27 2198/week @ 2025-09-03 1773/week @ 2025-09-10 2009/week @ 2025-09-17 4601/week @ 2025-09-24 6331/week @ 2025-10-01 9475/week @ 2025-10-08 9892/week @ 2025-10-15 10077/week @ 2025-10-22 10369/week @ 2025-10-29 10643/week @ 2025-11-05 10754/week @ 2025-11-12 10623/week @ 2025-11-19 8339/week @ 2025-11-26 7195/week @ 2025-12-03 5005/week @ 2025-12-10

32,737 downloads per month
Used in 14 crates (4 directly)

Apache-2.0 OR MIT

18KB
375 lines

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.


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.

Dependencies

~215–520KB