Scroll to navigation

ZFP(1) User Commands ZFP(1)

NAME

zfp - compress or expand files using the zfp algorithm

SYNOPSIS

zfp <options>

DESCRIPTION

zfp version 1.0.0 (August 1, 2022)

General options:

-h : read/write array and compression parameters from/to compressed header

-q : quiet mode; suppress output

-s : print error statistics

Input and output:

-i <path> : uncompressed binary input file ("-" for stdin)

-o <path> : decompressed binary output file ("-" for stdout)

-z <path> : compressed input (w/o -i) or output file ("-" for stdin/stdout)

Array type and dimensions (needed with -i):

-f : single precision (float type)

-d : double precision (double type)

-t <i32|i64|f32|f64> : integer or floating scalar type

-1 <nx> : dimensions for 1D array a[nx]

-2 <nx> <ny> : dimensions for 2D array a[ny][nx]

-3 <nx> <ny> <nz> : dimensions for 3D array a[nz][ny][nx]

-4 <nx> <ny> <nz> <nw> : dimensions for 4D array a[nw][nz][ny][nx]

Compression parameters (needed with -i):

-R : reversible (lossless) compression

-r <rate> : fixed rate (# compressed bits per floating-point value)

-p <precision> : fixed precision (# uncompressed bits per value)

-a <tolerance> : fixed accuracy (absolute error tolerance)

-c <minbits> <maxbits> <maxprec> <minexp> : advanced usage

minbits : min # bits per 4^d values in d dimensions maxbits : max # bits per 4^d values in d dimensions (0 for unlimited) maxprec : max # bits of precision per value (0 for full) minexp : min bit plane # coded (-1074 for all bit planes)

Execution parameters:

-x serial : serial compression (default)

-x omp[=threads[,chunk_size]] : OpenMP parallel compression

-x cuda : CUDA fixed rate parallel compression/decompression

EXAMPLES

-i file : read uncompressed file and compress to memory

-z file : read compressed file and decompress to memory

-i ifile -z zfile : read uncompressed ifile, write compressed zfile

-z zfile -o ofile : read compressed zfile, write decompressed ofile

-i ifile -o ofile : read ifile, compress, decompress, write ofile

-i file -s : read uncompressed file, compress to memory, print stats

-i - -o - -s : read stdin, compress, decompress, write stdout, print stats

-f -3 100 100 100 -r 16 : 2x fixed-rate compression of 100x100x100 floats

-d -1 1000000 -r 32 : 2x fixed-rate compression of 1M doubles

-d -2 1000 1000 -p 32 : 32-bit precision compression of 1000x1000 doubles

-d -1 1000000 -a 1e-9 : compression of 1M doubles with < 1e-9 max error

-d -1 1000000 -c 64 64 0 -1074 : 4x fixed-rate compression of 1M doubles

-x omp=16,256 : parallel compression with 16 threads, 256-block chunks

Usage: zfp <options> General options:

-h : read/write array and compression parameters from/to compressed header

-q : quiet mode; suppress output

-s : print error statistics

Input and output:

-i <path> : uncompressed binary input file ("-" for stdin)

-o <path> : decompressed binary output file ("-" for stdout)

-z <path> : compressed input (w/o -i) or output file ("-" for stdin/stdout)

Array type and dimensions (needed with -i):

-f : single precision (float type)

-d : double precision (double type)

-t <i32|i64|f32|f64> : integer or floating scalar type

-1 <nx> : dimensions for 1D array a[nx]

-2 <nx> <ny> : dimensions for 2D array a[ny][nx]

-3 <nx> <ny> <nz> : dimensions for 3D array a[nz][ny][nx]

-4 <nx> <ny> <nz> <nw> : dimensions for 4D array a[nw][nz][ny][nx]

Compression parameters (needed with -i):

-R : reversible (lossless) compression

-r <rate> : fixed rate (# compressed bits per floating-point value)

-p <precision> : fixed precision (# uncompressed bits per value)

-a <tolerance> : fixed accuracy (absolute error tolerance)

-c <minbits> <maxbits> <maxprec> <minexp> : advanced usage

minbits : min # bits per 4^d values in d dimensions maxbits : max # bits per 4^d values in d dimensions (0 for unlimited) maxprec : max # bits of precision per value (0 for full) minexp : min bit plane # coded (-1074 for all bit planes)

Execution parameters:

-x serial : serial compression (default)

-x omp[=threads[,chunk_size]] : OpenMP parallel compression

-x cuda : CUDA fixed rate parallel compression/decompression

-i file : read uncompressed file and compress to memory

-z file : read compressed file and decompress to memory

-i ifile -z zfile : read uncompressed ifile, write compressed zfile

-z zfile -o ofile : read compressed zfile, write decompressed ofile

-i ifile -o ofile : read ifile, compress, decompress, write ofile

-i file -s : read uncompressed file, compress to memory, print stats

-i - -o - -s : read stdin, compress, decompress, write stdout, print stats

-f -3 100 100 100 -r 16 : 2x fixed-rate compression of 100x100x100 floats

-d -1 1000000 -r 32 : 2x fixed-rate compression of 1M doubles

-d -2 1000 1000 -p 32 : 32-bit precision compression of 1000x1000 doubles

-d -1 1000000 -a 1e-9 : compression of 1M doubles with < 1e-9 max error

-d -1 1000000 -c 64 64 0 -1074 : 4x fixed-rate compression of 1M doubles

-x omp=16,256 : parallel compression with 16 threads, 256-block chunks

August 2022 zfp version 1.0.0 (August 1, 2022)