group-varint-offset-encoding

Crates.iogroup-varint-offset-encoding
lib.rsgroup-varint-offset-encoding
version0.1.1
sourcesrc
created_at2022-11-15 11:48:27.714556
updated_at2022-11-15 11:59:37.729359
descriptionFast algorithm to compress lists if integers in blocks of 4. Appends 0s to blocks, if length of input is not divisable by 4.
homepage
repositoryhttps://github.com/nilsmartel/int-compression
max_upload_size
id715635
size29,565
Nils Martel (nilsmartel)

documentation

README

Group Varint Offset Encoding

  • Compressed integers in blocks of 3.

  • Has good compretion rate, even with outliers.

  • Utilized offset encoding to store less bytes.

  • Appends zeros to your data, if it can't be grouped into 3. Manually keep track of the exact amount if needed.

Usage

let data: Vec<u32> = ...;

use group_varint_offset_encoding::{ compress, decompress };

// anything that can be iteratored into u32s works fine.
let compressed_data = compress(&data);

let decompressed_data = decompress(&compressed_data).to_vec();
Commit count: 20

cargo fmt