Environment (GNU Gzip) (original) (raw)
The environment variable GZIP
can hold a set of default options for gzip
. These options are interpreted first and can be overridden by explicit command line parameters. As this can cause problems when using scripts, this feature is supported only for --rsyncable, --synchronous, and options like -9 that set the compression level; any other options or operands in GZIP
are silently ignored.
You can use an alias or script instead. For example, instead of setting ‘GZIP="-9"’ in the environment, ifgzip
is in the directory ‘/usr/bin’ you can prepend$HOME/bin to your PATH
and create an executable script$HOME/bin/gzip containing the following:
#! /bin/sh export PATH=/usr/bin exec gzip -9 "$@"
The following environment variables are applicable only when usinggzip
on IBM Z mainframes supporting DEFLATE COMPRESSION CALL instruction:
DFLTCC
Whether DEFLATE COMPRESSION CALL should be used. Default value is ‘1’. Set this to ‘0’ to disable DEFLATE COMPRESSION CALL altogether.
DFLTCC_LEVEL_MASK
Compression levels on which DEFLATE COMPRESSION CALL should be used. Represented as a bit mask in decimal or hexadecimal form, where each bit corresponds to a compression level. Default value is ‘2’, which means level 1 only. In order to make use of DEFLATE COMPRESSION CALL by default, that is, on levels 1-6, set this to ‘0x7e’.
DFLTCC_BLOCK_SIZE
Size of deflate blocks produced by DEFLATE COMPRESSION CALL in bytes in decimal or hexadecimal form. Default value is ‘1048576’ (1 megabyte). When using DEFLATE COMPRESSION CALL to compress a file containing heterogeneous data (e.g. a ‘.tar’ archive containing text and binary files), setting this to a smaller value may improve compression ratio.
DFLTCC_FIRST_FHT_BLOCK_SIZE
Size of the first fixed deflate block produced by DEFLATE COMPRESSION CALL in bytes in decimal or hexadecimal form. Default value is ‘4096’ (4 kilobytes). When using DEFLATE COMPRESSION CALL to compress a small file, setting this to a larger value may improve compression ratio.
DFLTCC_RIBM
Value of "Reserved for IBM" field of DEFLATE COMPRESSION CALL parameter block. Default value is ‘0’.
SOURCE_DATE_EPOCH
If set to any value, disables compression with DEFLATE COMPRESSION CALL. This variable is normally set during reproducible builds, where DEFLATE COMPRESSION CALL must be disabled, because its output may not be reproducible.