Skip to content
J. Tian edited this page Oct 17, 2022 · 1 revision

Type cusz or cusz -h for instant instructions.

synopsis

<...> for the required; [...] for the optional printout

# compression (-z)
cusz -t <type> -m <mode> -e <error bound> -i <file> -l <N-D size> -z [--report time]
# decompression (-x)
cusz -i <.cusza file> -x [--compare <original file>] [--report time]

example

export PATH=$(pwd)/bin:$PATH               ## specify the path temporarily
cd data && sh ./sh.get-sample-data         ## download sample data
CESM=$(pwd)/cesm-CLDHGH-3600x1800 EB=1e-4
cusz -t f32 -m r2r -e ${EB} -i ${CESM} -l 3600x1800 -z --report time
cusz -i ${CESM}.cusza -x --compare ${CESM} --report time

The following essential arguments are required,

  • -z to compress; -x to decompress.
  • -m to specify error control mode from abs (absolute) and r2r (relative to value range)
  • -e to specify error bound
  • -i to specify input file
  • -l <size> to specify dimensions

advanced use

skip writing decompressed data

For evaluating purpose, we can skip writing to disk in decompression with --skip write2disk.

specify output path

mkdir data2 data3
# output compressed data to `data2`
cusz -t f32 -m r2r -e 1e-4 -i ./data/cesm-CLDHGH-3600x1800 -l 3600x1800 -z --opath data2
# output decompressed data to `data3`
cusz -i ./data2/cesm-CLDHGH-3600x1800.cusza -x --opath data3

dryrun to learn data quality

The actual compression or decompression is skipped; use -r or --dry-run in the command line.

# This works equivalently to decompress with `--origin /path/to/origin-datum`
cusz -t f32 -m r2r -e 1e-4 -i ./data/cesm-CLDHGH-3600x1800 -l 3600x1800 -r
Clone this wiki locally