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 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)
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 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

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