Usage

The command line syntax of rzopfli is similar to gzip and zstd, and some options derived from the Zopfli reference implementation. rzopfli preserves input files by default, just like zstd. It’s possible to remove them automatically by using --rm.

Basic usage

Compress a file into the gzip format
rzopfli foo.txt
Write the processed data to standard output
rzopfli -c foo.txt
Remove an input file after successful compression
rzopfli --rm foo.txt
Performs 50 compression iterations
rzopfli -i 50 foo.txt
Compress a file into the zlib format
rzopfli --format zlib foo.txt

Generate shell completion

--generate-completion option generates shell completions to standard output.

The following shells are supported
  • bash

  • elvish

  • fish

  • nushell

  • powershell

  • zsh

Example
rzopfli --generate-completion bash > rzopfli.bash