summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/coding/interpolative.h
Commit message (Collapse)AuthorAgeFilesLines
* Add bit I/O and binary interpolative coding to library/cpp/yt/codingbabenko5 days1-0/+52
### `bit_io.h` MSB-first bit-stream writer/reader (`TBitWriter` / `TBitReader`) over a caller-owned buffer. The writer flushes whole 32-bit words via the unaligned-store API; the reader assumes a few bytes of over-read slack. ### `interpolative.h` - **Truncated-binary (minimal) code** — the entropy-optimal integer code for a uniform value in `[0, rangeSize)`. - **Binary interpolative coding** — `InterpolativeEncode` / `InterpolativeDecode` for sorted, strictly increasing integer sequences over a known range `[lo, hi]`. It recursively codes the median of each subrange, compressing clustered sequences well below a flat `log2` per element with no per-element headers. Length is conveyed out of band (e.g. via the existing `varint`). commit_hash:8baf84444b8cf8e8a6e32776b4ff48582187ac2b