Python/Compression: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
== LZMA ==
== LZMA (*.xz) ==
 
* See: https://docs.python.org/3/library/lzma.html


=== Decompress ===
=== Decompress ===
<source lang="python">
<source lang="python">
import lzma
with lzma.open("file.xz") as f:
    file_content = f.read()
</source>
</source>


Line 10: Line 15:
</source>
</source>


== Zip ==
== Zip (*.zip) ==
* See: https://docs.python.org/3/library/zipfile.html
 
=== Decompress ===
<source lang="python">
# TODO
</source>
 
=== Compress ===
<source lang="python">
# TODO
</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