MCPcopy Create free account
hub / github.com/SwayStar123/SpeedrunDiT / zip_write_bytes

Function zip_write_bytes

preprocessing/dataset_tools.py:155–156  ·  view source on GitHub ↗
(fname: str, data: Union[bytes, str])

Source from the content-addressed store, hash-verified

153 os.makedirs(os.path.dirname(dest), exist_ok=True)
154 zf = zipfile.ZipFile(file=dest, mode='w', compression=zipfile.ZIP_STORED)
155 def zip_write_bytes(fname: str, data: Union[bytes, str]):
156 zf.writestr(fname, data)
157 return '', zip_write_bytes, zf.close
158 else:
159 # If the output folder already exists, check that is is

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected