def METHOD_NAME(cls, filename, chunk_size=50_000_000):
    zipped = f"{filename}.gz"
    obj = zlib.compressobj()
    with open(zipped, "wb") as zip_file:
        with open(filename, "rb") as file:
            while True:
                chunk = file.read(chunk_size)
                if chunk:
                    compressed = obj.compress(chunk)
                    zip_file.write(compressed)
                else:
                    compressed = obj.flush()
                    if compressed:
                        zip_file.write(compressed)
                    break
    return zipped