def extractor(self, fname):
        fname = os.path.abspath(fname)
        outfile = os.path.splitext(fname)[0]

        try:
            fpout = open(outfile, "wb")
            gz = gzip.GzipFile(fname, "rb")

            while True:
                data = gz.read(self.BLOCK_SIZE)
                if data:
                    fpout.write(data)
                else:
                    break

            gz.close()
            fpout.close()
        except __HOLE__ as e:
            raise e
        except Exception as e:
            return False

        return True
dataset/ETHPy150Open devttys0/binwalk/src/binwalk/plugins/gzipextract.py/GzipExtractPlugin.extractor