MCPcopy Create free account
hub / github.com/Kitware/VTK / zipCompression

Function zipCompression

Web/Python/vtkmodules/web/render_window_serializer.py:28–33  ·  view source on GitHub ↗
(name, data)

Source from the content-addressed store, hash-verified

26# -----------------------------------------------------------------------------
27
28def zipCompression(name, data):
29 with io.BytesIO() as in_memory:
30 with zipfile.ZipFile(in_memory, mode="w") as zf:
31 zf.writestr("data/%s" % name, data, zipfile.ZIP_DEFLATED)
32 in_memory.seek(0)
33 return in_memory.read()
34
35
36def dataTableToList(dataTable):

Callers 1

getCachedDataArrayMethod · 0.85

Calls 2

seekMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected