Write data into zipfile and return the bytes
(data)
| 8 | |
| 9 | |
| 10 | def zip_compress(data): |
| 11 | """Write data into zipfile and return the bytes""" |
| 12 | out = io.BytesIO() |
| 13 | with zipfile.ZipFile(file=out, mode="w") as z: |
| 14 | with z.open("myfile", "w") as zf: |
| 15 | zf.write(data) |
| 16 | out.seek(0) |
| 17 | return out.read() |
| 18 | |
| 19 | |
| 20 | compress = { |
nothing calls this directly
no outgoing calls
no test coverage detected