Abstract
As floating-point time series data is generated at an unprecedented rate, efficient and lossless compression has become critical. Existing XOR-based methods, such as Gorilla and Chimp, often fail to achieve optimal compression ratios because they do not fully exploit trailing zeros in floating-point representations. This paper introduces Elf and its optimized version Elf+, which utilize a novel "erasing" technique. By setting the least significant bits of floating-point values to zero—and proving this process is mathematically reversible—Elf creates a high density of trailing zeros that significantly improves XOR-based encoding. Extensive experiments across 22 datasets demonstrate that Elf+ outperforms state-of-the-art competitors, achieving up to a 43.9% improvement in compression ratio while maintaining the $O(N)$ time complexity required for real-time streaming.
Introduction
We are currently witnessing an explosion of sensor data from industrial IoT, aerospace, and financial sectors. This data is predominantly stored as floating-point time series. While general-purpose compressors like LZ4 are fast, they are not optimized for the binary structure of floating-point numbers. Specialized XOR-based compressors like Facebook’s Gorilla have become the standard, yet they rely on the presence of leading and trailing zeros in XORed results. In practice, raw floating-point values rarely possess many trailing zeros, which limits the effectiveness of these algorithms.
The Elf Compression Framework
The core innovation of this research is the Elf Eraser. The algorithm determines the decimal precision of a value (e.g., two decimal places for 3.17) and "erases" (sets to zero) the bits in the binary mantissa that do not contribute to that precision. This results in a modified value ($v'$) that is numerically close to the original but contains a long string of trailing zeros.
Lossless Recovery and Elf+
Through rigorous mathematical analysis (Theorem 1), the authors prove that if the decimal significand count is known, the original value can be perfectly reconstructed from the erased version. This ensures the method remains strictly lossless.
To further enhance performance, Elf+ exploits the "temporal locality of precision." Since sensors typically maintain a consistent decimal precision over time, Elf+ uses a 1-bit flag to indicate if the current value's significand count matches the previous one, drastically reducing metadata overhead. Additionally, a custom XOR compressor ($XOR_{cmp}$) was designed to specifically handle the unique zero distribution created by the erasing process.
Performance Evaluation
The researchers evaluated Elf and Elf+ against 9 competitors using 22 diverse datasets, including City-temp, Wind-speed, and Bitcoin-price.
- Compression Ratio: Elf+ outperformed all other floating-point specialists, showing a 12.4% improvement over Chimp128 and a 43.9% improvement over Gorilla.
- Speed and Efficiency: While high-ratio general compressors like
Xzcan be effective, Elf+ was approximately 25 times faster at compression and 10 times faster at decompression. Its $O(N)$ time and $O(1)$ space complexity make it ideal for low-power edge devices. - Robustness: The algorithm remains effective across various precisions, though its gains are most pronounced for data with 15 or fewer significant decimal digits.
Conclusion
Elf and Elf+ represent a significant advancement in time series compression by identifying trailing zeros as an "untapped goldmine." By artificially creating these zeros through a lossless erasing process, the authors have set a new benchmark for floating-point compression. Future work will explore hardware-level optimizations to further accelerate the calculation of decimal significand counts, potentially making Elf the de facto standard for high-velocity data streams.
Summary updated