cnk
Set compression via C(n,k): ROC, ANS, delta encoding.
Dual-licensed under MIT or Apache-2.0.
use ;
let compressor = new;
let ids = vec!;
let universe_size = 1000;
let compressed = compressor.compress_set.unwrap;
let decompressed = compressor.decompress_set.unwrap;
assert_eq!;
A set of size n from universe [N] has (\binom{N}{n}) possibilities, so the information-theoretic minimum is (\log_2 \binom{N}{n}) bits. ROC approaches this bound by treating permutation as a latent variable.