'Limited support for zipfile.ZipFile objects containing a single
a file.  Allows reading only for now by extracting the file to a
tempfile.'

def _open_zipfile(self, fileobj, mode):

    if (mode in ('update', 'append')):
        raise IOError('Writing    to    zipped    fits    files    is    not    currently    supported')
    if (not isinstance(fileobj, zipfile.ZipFile)):
        zfile = zipfile.ZipFile(fileobj)
        close = True
    else:
        zfile = fileobj
        close = False
    namelist = zfile.namelist()
    if (len(namelist) != 1):
        raise IOError('Zip    files    with    multiple    members    are    not    supported.')
    self._file = tempfile.NamedTemporaryFile(suffix='.fits')
    self._file.write(zfile.read(namelist[0]))
    if close:
        zfile.close()
    self.compression = 'zip'
