7z - Serbipunk/notes GitHub Wiki

examples

compress with encryption

7z a -p8672 yt2101.7z yt2101

compress with encryption for names

7z a -mhe -p8672 yt2101.7z yt2101

cpus (seems engage all cpus in by default settings)

ref: https://www.pontikis.net/blog/easily-compress-encrypt-files-using-7z-p7zip-linux

software: 7z library: py7zr

compress

py7zr

# without encryption
with py7zr.SevenZipFile("20221212173446_INC.7z", "w") as archive:
    archive.writeall("20221212173446_INC", "base")

# with encryption
with py7zr.SevenZipFile("20221212173446_INC.7z", "w", password="aichuanda2020") as archive:
    archive.writeall("20221212173446_INC", "")

extract

software

7z x 20221212173446_INC.7z 
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,12 CPUs Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (906EA),ASM,AES-NI)

Scanning the drive for archives:
1 file, 2189009 bytes (2138 KiB)

Extracting archive: 20221212173446_INC.7z
--
Path = 20221212173446_INC.7z
Type = 7z
Physical Size = 2189009
Headers Size = 1265
Method = LZMA2:24 7zAES
Solid = +
Blocks = 1

    
Enter password (will not be echoed):
Everything is Ok

python

with py7zr.SevenZipFile("20221212173446_INC.7z", mode="r", password="aichuanda2020") as a2:
    a2.extractall(path="./7z")

using multiple cores

https://superuser.com/a/1244146

-mmt=256

xdzyywlbwqlfhz