Skip to main content

Crate graupel

Crate graupel 

Source
Expand description

Lossless time series compression codecs, measured against each other on real weather station observations. See docs/format.md for the block formats.

The codecs allocate nothing beyond the output buffer, so the crate builds without std: default-features = false leaves everything except the error trait and the benchmark.

use graupel::{codec::Gorilla, Codec, Point};

let points = vec![
    Point::new(1_672_531_200, 8.2),
    Point::new(1_672_534_800, 8.1),
    Point::new(1_672_538_400, 7.9),
];
let block = Gorilla.encode(&points).unwrap();
assert_eq!(graupel::decode(&block).unwrap(), points);

Re-exports§

pub use codec::decode;
pub use codec::Codec;

Modules§

bits
codec
dataset
Parsers for the public archives the benchmark runs on. All three are downloadable without an account, which is what makes the results reproducible.

Structs§

Point
A single observation: seconds since the Unix epoch, and the measured value.

Enums§

Error

Constants§

RAW_POINT_BYTES
Bytes a point occupies uncompressed: an i64 timestamp plus an f64 value.

Functions§

chunk_by_window
Splits a series into the blocks a real database would store, cutting on fixed epoch-aligned windows rather than on a point count, which is what Prometheus and friends do.

Type Aliases§

Result