#64-bit #integer-compression #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

#791 in Compression

Download history 10020/week @ 2025-10-20 10143/week @ 2025-10-27 10930/week @ 2025-11-03 10439/week @ 2025-11-10 10848/week @ 2025-11-17 9010/week @ 2025-11-24 7562/week @ 2025-12-01 5996/week @ 2025-12-08 6132/week @ 2025-12-15 6030/week @ 2025-12-22 7004/week @ 2025-12-29 6547/week @ 2026-01-05 7057/week @ 2026-01-12 6717/week @ 2026-01-19 5227/week @ 2026-01-26 4888/week @ 2026-02-02

24,641 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–510KB