Python/Compression: Difference between revisions
< Python
Jump to navigation
Jump to search
| Line 5: | Line 5: | ||
=== Decompress === | === Decompress === | ||
<source lang="python"> | <source lang="python"> | ||
import lzma | |||
with lzma.open("file.xz") as f: | |||
file_content = f.read() | |||
</source> | </source> | ||
Latest revision as of 03:47, 26 February 2020
LZMA (*.xz)
Decompress
import lzma
with lzma.open("file.xz") as f:
file_content = f.read()
Compress
# TODO
Zip (*.zip)
Decompress
# TODO
Compress
# TODO