Skip to main content

Implementation of TACO: A Lightweight Tree-Based Approximate Compression Method for Time Series

Project description

taco-compression

This is the official implementation of the TACO compression algorithm for time series [1].

Installation

Please install via pip:

pip install tacocompression

Usage

There are two usage modes, one as a command line tool operating on files, the other as callables from within python.

Command Line

Please use python -m tacocompression to (de)compress your time series from the command line interface. This application takes 4 named keyword arguments and at least one additional argument specifying the input(s). These inputs are the paths to the files/directory of the (compressed) time series. You can either specify a directory from which all csv files are read...

python -m tacocompression -m=c -o=compressed time_series

... or by passing the paths to the files directly.

python -m tacocompression -m=c -o=. data/time_series_1.csv data/time_series_2.csv

Each file must contain a single column interpreted as a univariate time series. We assume row 0 is the header. The compressed data is saved in csv files as well.

The keyword arguments are

  • mode (short: m) Use c to compress and d to decompress.
  • output (short: o) Provide a directory to save the outputs to.
  • decimals (short: d) Precision of the reconstruction, i.e., number of decimals recoverable during decompression.
  • pairing_function (short: p) One of "rosenberg", "szudzik", and "cantor".

To decompress the above time series, use

python -m tacocompression -m=d -o=time_series compressed

respectively

python -m tacocompression -m=d -o=data compressed_time_series_1.csv compressed_time_series_2.csv

As a Callable

from tacocompression import compress, decompress

# 2 univariate time series, length 10 and 8:
time_series = [[0.0, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9], [8.8, 7.7, 6.6, 5.5, 4.4, 3.3, 2.2, 1.1]]

compressed = compress(time_series, "szudzik", 1)
reconstructed = decompress(compressed, "szudzik")

assert time_series == reconstructed

[1] Bauer, André. TACO: A Lightweight Tree-Based Approximate Compression Method for Time Series. In: Proceedings of the 14th International Conference on Data Science, Technology and Applications (DATA 2025), pages 182-190. 2025.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tacocompression-0.9.4.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tacocompression-0.9.4-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file tacocompression-0.9.4.tar.gz.

File metadata

  • Download URL: tacocompression-0.9.4.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for tacocompression-0.9.4.tar.gz
Algorithm Hash digest
SHA256 1b7e2a0eb8df367a43a039ff3a6fc7b62e38f0747ad8187525965cd8e14b9e02
MD5 3f5d4c415de13463f69b4d40642fc8a1
BLAKE2b-256 d16482a19839c4b920ce74e2fccc771a1ee12db75d8b35cd5f08abcc80f2a4fe

See more details on using hashes here.

File details

Details for the file tacocompression-0.9.4-py3-none-any.whl.

File metadata

File hashes

Hashes for tacocompression-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8eca200664cf2b18f04a193d3778533981ef3b0896825ac176c1720768b96b90
MD5 92b0e51284d5de8147744144237c0bf1
BLAKE2b-256 4ce64b2ac416cb87e312e8edf5bb35486fe6a97297612d29d607af7908fc4a80

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page