Example #1
0
 /**
  * Maps the given filename to the name that the file should have after compression with gzip.
  * 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.
  *
  * @param filename name of a file
  * @return name of the corresponding compressed file
  */
 public static String getCompressedFilename(final String filename) {
   return fileNameUtil.getCompressedFilename(filename);
 }
Example #2
0
 /**
  * Detects common gzip suffixes in the given filename.
  *
  * @param filename name of a file
  * @return {@code true} if the filename has a common gzip suffix, {@code false} otherwise
  */
 public static boolean isCompressedFilename(final String filename) {
   return fileNameUtil.isCompressedFilename(filename);
 }