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:
```shell qcompress compress --csv my.csv --col-name mycolumn out.qco qcompress compress --parquet my.snappy.parquet --col-name mycolumn out.qco
qcompress compress \ --csv my.csv \ --col-idx 0 \ --csv-has-header \ --dtype u32 \ --level 7 \ --overwrite \ out.qco
qcompress compress \ --csv timeseries.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 timeseries.csv \ --col-name temperature \ --dtype f32 \ --delta-order 3 \ out.qco ```
This command prints numbers in a .qco file to stdout.
Examples:
shell
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:
```shell % qcompress inspect in.qco ...
data type: f64 flags: Flags { use5bitprefixlen: true, deltaencodingorder: 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.