Historically, newsyslog compressed rotated log files to save disk space. This was
useful in the early days. However, with modern file systems like ZFS offering native
compression, and with the availability of larger hard drives, the benefits of
additional compression have become less significant. This is particularly true
considering the inconvenience of decompressing log files when searching for
specific patterns.
Additionally, the original implementation of compression methods was not future-proof.
As a result, we have redefined the J, X, Y, Z flags to signify "treat the file as
compressible" rather than "compress the file with that specific method."
A new command-line option, -c, has been introduced to allow overriding these settings
in a more future-proof way. The available choices are:
none - do not compress, regardless of flag. legacy - historical behavior: J=bzip2, X=xz, Y=zstd, Z=gzip. bzip2, xz, zstd, gzip - apply the specified compression method.
Currently, the default is set to 'legacy' to preserve historical behavior. However,
our intention is to change this default to 'none' in FreeBSD 15.0.
Additionally, this update changes the default settings for zstd to use multithreading
and long-range options, better aligning with its intended use.
Inspired by D42961