Labs
Each lab takes under an hour on a laptop and turns a claim from this mechanism into a number you measured yourself.
- 1
Find your own break-even point D/B
Compress a 300 MB JSON log at zstd levels 1 to 19 and check, against a local disk and an object store, whether decoding beats reading.
MeasurePython with zstandard - 2
How big is JSON really, after compression?
Encode 1,000 parcel-scan records as JSON and as Avro, raw and after zstd, with random and with sequential IDs.
MeasurePython with fastavro, zstandard - 3
Make `memcmp` sort your numbers correctly
Sort 10,000 integers and floats by their byte encodings, with and without the sign-bit flip and the float rule, and test composite-key escaping.
MeasurePython - 4
Varint and zigzag: where the bet wins and loses
Bytes per value under varint and zigzag + varint for small counts, IDs, random 64-bit values and small signed numbers.
MeasurePython - 5
Row order versus codec
Write 2 million rows to Parquet shuffled and sorted under NONE, SNAPPY and ZSTD; compare sizes and the depot column's row-group statistics.
MeasurePython with PyArrow, NumPy - 6
One outlier sets the width
Bit-pack a block of 128 values, add one outlier, then patch it out with PFOR.
MeasurePython with NumPy - 7
Encoding by hand: dictionary, RLE and delta
A 10-million-value country column and a sorted timestamp column: dictionary, RLE before and after sorting, delta, and gzip, computed by hand.
MeasurePython with NumPy - 8
Are your floats decimals in disguise?
A million latitude-like doubles with six decimals: zlib on the raw bytes against scaling to integers and frame-of-reference.
MeasurePython with NumPy - 9
Block size, ratio and point-lookup cost
Compress 200,000 JSON rows in blocks from 1 KB to 1 MB; compare ratio and the cost of decoding one block for a point lookup.
MeasurePython with zstandard - 10
Does a trained dictionary rescue small messages?
Compress 100-byte JSON messages one at a time with and without a trained zstd dictionary, then decode with the wrong one.
MeasurePython with zstandard