sets up the utility with a map of known compressed to
uncompressed suffix mappings and the default extension of the
uncompressSuffix - Map from common filename suffixes of
compressed files to the corresponding suffixes of uncompressed
files. For example: from ".tgz" to ".tar". This map also
contains format-specific suffixes like ".gz" and "-z". These
suffixes are mapped to the empty string, as they should simply
be removed from the filename when the file is uncompressed.
defaultExtension - the format's default extension like ".gz"
public boolean isCompressedFilename(String filename)
Detects common format suffixes in the given filename.
filename - name of a file
true if the filename has a common format suffix,
Maps the given name of a compressed file to the name that the
file should have after uncompression. Commonly used file type specific
suffixes like ".tgz" or ".svgz" are automatically detected and
correctly mapped. For example the name "package.tgz" is mapped to
"package.tar". And any filenames with the generic ".gz" suffix
(or any other generic gzip suffix) is mapped to a name without that
suffix. If no format suffix is detected, then the filename is returned
Maps the given filename to the name that the file should have after
compression. Common file types with custom suffixes for
compressed versions are automatically detected and correctly mapped.
For example the name "package.tar" is mapped to "package.tgz". If no
custom mapping is applicable, then the default ".gz" suffix is appended
to the filename.