Heap is measured after GC, with the large page already resident and compressed output discarded. It excludes decoder buffers and the rest of the application. Native peak RSS includes the Python interpreter and inherited process high-water; small workspace differences cannot be inferred from its common floor.
Method, versions and limitations
15 deterministic synthetic corpora, 228 bytes–4,058,818 bytes. Records use generated UTF-8 structured JSON, and simulated ciphertext uses uniform pseudorandom bytes. Real encrypted content is not inspected. The record packing pair starts from identical generated plaintext records; encryption is modeled by equal-length random bytes, so crypto CPU and nested-envelope overhead are excluded. Do not interpret the packing percentage as a forecast of user data.
A 16 KiB dictionary was trained on separate synthetic records with distinct IDs and a different seed; dictionary training and download cost are excluded from codec timing. Dictionary wins need amortization and a new negotiated record format.
Go Zstandard modes are library presets, approximately corresponding to native levels 1/3/7/11; levels are not directly comparable across libraries. Native bindings include allocation/copy overhead. Go reuse measurements keep output buffers warm; streaming HTTP and retained-memory measurements are separate. Empirical p95 with small sample counts is coarse, especially high-effort codecs. No phone energy, packet loss, target server, TLS or production tail latency has been measured. The benchmark run itself did not change or deploy production code; see the compression guide for current behavior.