Camel: Efficient Compression of Floating-Point Time Series

December 9, 2025 · View on GitHub

Project Structure

This project mainly includes the following various compression algorithms:

  • The main code for the Camel algorithm is in the yyy/ts/compress/camel package.

Camel includes compressor and decompressor packages as well as xorcompressor and xordecompressor.

compressor package

This package includes 5 different XOR-based compression algorithms and provides a standard ICompressor interface.

  • CamelCompressor: This class is the complete Camel compression algorithm.

TEST Camel

We recommend IntelliJ IDEA for developing this project. In our experiment, the default data block size is 1000. That is, 1000 pieces of data are read in each time for compression testing. If the size of the data set is less than 1000, we will not read it. The final experimental result is an average calculation of the compression of all data blocks.

  • Camel compressor test: org/urbcomp/startdb/compress/elf/doubleprecision/TestCamel.java Noted that: 1)Before running the program, the parameter DECIMAL_MAX_COUNT in Camel.java can be configured based on the dataset to control the number of decimal places to retain. 2)The maximum threshold for the difference in the integer part can also be adjusted according to the characteristics of the dataset. It does not necessarily have to be 16 bits. For example, in the City-temp dataset, the temperature variation in the integer part does not exceed 100, so allocating 7 bits would also be sufficient.
  • Camel Index building test: org/urbcomp/startdb/compress/elf/doubleprecision/TestCamelTree.java

Prerequisites for testing

The following resources need to be downloaded and installed:

Download and install jdk-8, IntelliJ IDEA and git. IntelliJ IDEA's maven project comes with maven, you can also use your own maven environment, just change it in the settings.

Set JDK

File -> Project Structure -> Project -> Project SDK -> add SDK

Click JDK to select the address where you want to download jdk-8