func stripCompressionExtension(dest string, contentEncoding string) string {
	// Ignore error getting compression type. We can't easily report it now, and we don't need to know about the error
	// cases here when deciding renaming.  STE will log error on the error cases
	ct, _ := GetCompressionType(contentEncoding)
	ext := strings.ToLower(filepath.Ext(dest))
	stripGzip := ct == ECompressionType.GZip() && (ext == ".gz" || ext == ".gzip")
	stripZlib := ct == ECompressionType.ZLib() && ext == ".zz" // "standard" extension for zlib-wrapped files, according to pigz doc and Stack Overflow
	if stripGzip || stripZlib {
		return strings.TrimSuffix(dest, filepath.Ext(dest))
	}
	return dest
}
// stringCompressionExtension strips any file extension that corresponds to the
// compression indicated by the encoding type.
// Why remove this extension here, at enumeration time, instead of just doing it
// in the STE when we are about to save the file?
// Because by doing it here we get the accurate name in things that
// directly read the Plan files, like the jobs show command
stringCompressionExtension strips any file extension that corresponds to the
compression indicated by the encoding type.
Why remove this extension here, at enumeration time, instead of just doing it
in the STE when we are about to save the file.
Because by doing it here we get the accurate name in things that
directly read the Plan files, like the jobs show command
// stringCompressionExtension strips any file extension that corresponds to the // compression indicated by the encoding type . // Why remove this extension here at enumeration time instead of just doing it // in the STE when we are about to save the file? // Because by doing it here we get the accurate name in things that // directly read the Plan files like the jobs show command
func stripCompressionExtension(dest string, contentEncoding string) string {
	ct, _ := GetCompressionType(contentEncoding)
	ext := strings.ToLower(filepath.Ext(dest))
	stripGzip := ct == ECompressionType.GZip() && (ext == ".gz" || ext == ".gzip")
	stripZlib := ct == ECompressionType.ZLib() && ext == ".zz" 
	if stripGzip || stripZlib {
		return strings.TrimSuffix(dest, filepath.Ext(dest))
	}
	return dest
}
func stripCompressionExtension ( dest string , contentEncoding string ) string { ct , _ := GetCompressionType ( contentEncoding ) ext := strings . ToLower ( filepath . Ext ( dest ) ) stripGzip := ct == ECompressionType . GZip ( ) && ( ext == " " || ext == " " ) stripZlib := ct == ECompressionType . ZLib ( ) && ext == " " if stripGzip || stripZlib { return strings . TrimSuffix ( dest , filepath . Ext ( dest ) ) } return dest }
stringCompressionExtension strips any file extension that corresponds to the
compression indicated by the encoding type.
stringCompressionExtension strips any file extension that corresponds to the compression indicated by the encoding type .
// Ignore error getting compression type. We can't easily report it now, and we don't need to know about the error // cases here when deciding renaming.  STE will log error on the error cases // "standard" extension for zlib-wrapped files, according to pigz doc and Stack Overflow