import re


def find_os_compression_type(filename):
    """ Find if filename is OS compressed
      filename: the filename to check
      return: compression type (if any) else None. The compression type is 
              returned as a string and can be any of: 
              ['.Z', '.gz', '.tar.gz', '.zip']
  """
    dct = [['.Z', re.compile('.*.Z$')], ['.tar.gz',
                                         re.compile('.*.tar.gz$')],
           ['.gz', re.compile('.*.gz$')], ['.zip',
                                           re.compile('.*.zip$')]]
    for tp in dct:
        xtype, rgx = tp
        if rgx.match(filename):
            return xtype
    return None