Skip to content
Tech News
← Back to articles

Fc, a lossless compressor for floating-point streams

read original more articles

fc — Floating-Point Compressor

Copyright (c) 2026 Praveen Vaddadi [email protected] Licensed under the Apache License, Version 2.0. See LICENSE and NOTICE.

fc is a lossless compressor for streams of IEEE-754 64-bit doubles. It splits the input into adaptively-sized blocks (quanta), runs a competition between many specialized codecs on each block, and emits the smallest result. Compression and decompression are multi-threaded with POSIX threads and the hot paths are hand-vectorized for x86-64 with AVX2 + SSE4.2 + BMI + LZCNT.

The current version string is fc 1.56 (see fc_ver in fc.c ).

Representative numbers

Aggregate result of the bundled test_fc harness across 17 synthetic datasets, 1 Mi doubles each (8 MiB per dataset, ≈136 MiB / 142.6 MB decimal total), median-of-5 trials per dataset, 8 encoder threads, decoder threads auto-selected, on the maintainer's x86-64 + AVX2 box. The "Ratio" column is total_original / total_compressed ; the throughput columns are the harmonic mean of per-dataset MB/s. Numbers come straight out of test_fc.csv and will move on different hardware — re-run make test to regenerate.

Codec Ratio Encode (MB/s) Decode (MB/s) fc 3.07 120 1277 zstd -3 2.07 528 1556 zstd -9 2.09 111 1572 fpzip 1.71 123 121 lz4hc -9 1.69 51 5835 gorilla 1.66 683 971 lz4 1.62 2176 5353

Headline: fc is the best size-oriented floating-point compressor in this benchmark, not the best all-around compressor. It wins ratio on 10 of 17 datasets outright and is never worse than roughly third on any of them.

Where fc wins (often by a lot):

Structured / analytic floats — constant ≈ 39,756× (vs. zstd-9 ≈ 11,619×), parabolic ≈ 2,973× (vs. 2.5×), int×1000 ≈ 5,388× (vs. 4.3×), piecewise ≈ 26.8× (vs. 14.9×), stocks ≈ 15.6× (vs. 7.1×).

... continue reading