Crates.io | q_compress_cli |
lib.rs | q_compress_cli |
version | 0.11.2 |
source | src |
created_at | 2022-05-05 15:06:07.616276 |
updated_at | 2022-11-09 05:21:34.556501 |
description | CLI for q_compress and .qco format |
homepage | |
repository | https://github.com/mwlon/quantile-compression |
max_upload_size | |
id | 581051 |
size | 61,069 |
q_compress
CLIYou can compress, decompress, and inspect .qco files using our simple CLI. Follow this setup:
cargo install q_compress_cli
This provides you with the qcompress
command.
You can always get help, e.g. qcompress
, qcompress compress --help
.
This command compresses a single column of a .csv or .parquet file into a .qco
file.
If delta encoding order (--delta-order
) is not specified, the default
behavior is to use the first numbers and make an educated guess for the best
delta encoding order.
Examples:
qcompress compress --csv my.csv --col-name my_column out.qco
qcompress compress --parquet my.snappy.parquet --col-name my_column out.qco
qcompress compress \
--csv my.csv \
--col-idx 0 \
--csv-has-header \
--dtype u32 \
--level 7 \
--overwrite \
out.qco
qcompress compress \
--csv time_series.csv \
--csv-timestamp-format "%Y-%m-%d %H:%M:%S%.f%z" \
--col-name time \
--dtype TimestampMicros \
--delta-order 1 \
out.qco
qcompress compress \
--csv time_series.csv \
--col-name temperature \
--dtype f32 \
--delta-order 3 \
out.qco
This command prints numbers in a .qco file to stdout.
Examples:
qcompress decompress --limit 10 in.qco
qcompress decompress --timestamp-format "%Y-%m-%d %H:%M:%S.%f" in.qco > out.txt
This command prints out information about a .qco file.
Examples:
% qcompress inspect in.qco
...
inspecting "in.qco"
=================
data type: f64
flags: Flags { use_5_bit_prefix_len: true, delta_encoding_order: 0 }
number of chunks: 1
total n: 1000000
uncompressed byte size: 8000000
compressed byte size: 6967210 (ratio: 1.1482358074465964)
header size: 6
chunk metadata size: 602
chunk body size: 6966601
footer size: 1
unknown trailing bytes: 0
[min, max] numbers: [-4.628380674508539, 4.919770799153994]
...
The major and minor semver versions of this crate are meant to match that of
q_compress
.
However, the patch version is not related to q_compress
's patch version.