ZFP(1)
π ZFP(1) π
okay bestie, welcome to the zfp manual page β this is the User Commands girlie and she's here to compress or expand files using the zfp algorithm. no cap.
β¨ NAME β¨
zfp β compress or expand files using the zfp algorithm ποΈ
β¨ SYNOPSIS β¨
zfp <options>
πΈ DESCRIPTION πΈ
zfp version 1.0.0 (August 1, 2022) β yes she has a birthday and it's literally 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 arraya[nx]-2<nx><ny>β dimensions for 2D arraya[ny][nx]-3<nx><ny><nz>β dimensions for 3D arraya[nz][ny][nx]-4<nx><ny><nz><nw>β dimensions for 4D arraya[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 usageminbits: min # bits per4^dvalues in d dimensionsmaxbits: max # bits per4^dvalues in d dimensions (0for unlimited)maxprec: max # bits of precision per value (0for full)minexp: min bit plane # coded (-1074for all bit planes)
bestie -c is the "advanced usage" one β she's giving final boss energy. you don't have to understand her, but she's iconic. π
β Execution parameters:
-x serialβ serial compression (default)-x omp[=threads[,chunk_size]]β OpenMP parallel compression-x cudaβ CUDA fixed rate parallel compression/decompression
π EXAMPLES π
like, here's the tea on how you'd actually call her:
-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
and then β not me about to explain this β she ALSO spits out this whole thing again, like the usage + every single option a second time, which is honestly so extra of her π so here it is, in full, exactly as she says it:
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 arraya[nx]-2<nx><ny>β dimensions for 2D arraya[ny][nx]-3<nx><ny><nz>β dimensions for 3D arraya[nz][ny][nx]-4<nx><ny><nz><nw>β dimensions for 4D arraya[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 usageminbits: min # bits per4^dvalues in d dimensionsmaxbits: max # bits per4^dvalues in d dimensions (0for unlimited)maxprec: max # bits of precision per value (0for full)minexp: min bit plane # coded (-1074for 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
and the examples, round two, same energy, same words:
-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
and that's the whole page, bestie π«Ά you ate. go compress something. periodt. π β¨
zfp version 1.0.0 β August 1, 2022, so basically a Leo β β stamped August 2022, ZFP(1). mwah, bye ππ
π¦ where this page comes from
- debian bookworm: zfp 1.0.0-7
- debian trixie: zfp 1.0.1-4+b6
- ubuntu noble: zfp 1.0.1-3.1build1
- ubuntu questing: zfp 1.0.1-4build3
- ubuntu resolute: zfp 1.0.1-4build5
- ubuntu stonking: zfp 1.0.1-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms