def _compress(compress):
 if (compress in ('bz2', 'bzip2', 'j')):
  compression = 'j'
  ext = 'bz2'
 elif (compress in ('gz', 'gzip', 'z')):
  compression = 'z'
  ext = 'gz'
 elif (compress in ('xz', 'a', 'J')):
  compression = 'J'
  ext = 'xz'
 return (compression, ext)

def _compress ( compress ) : if ( compress in ( 'bz2' , 'bzip2' , 'j' ) ) : compression = 'j' ext = 'bz2' elif ( compress in ( 'gz' , 'gzip' , 'z' ) ) : compression = 'z' ext = 'gz' elif ( compress in ( 'xz' , 'a' , 'J' ) ) : compression = 'J' ext = 'xz' return ( compression , ext )
resolve compression flags .