如果選擇 「顯示系統選單」,7-Zip 會呼叫 Windows 檔案總管的右鍵選單,也就是你在 Explorer 裡右鍵會看到的功能(像「剪下、複製、傳送到、內容」等)。
使用大記憶體分頁
這個不要設了 記憶體分頁 會影響系統
允許用來解壓縮的最大記憶體容量
這個也不要設了 用預設即可
7-Zip 功能很強大 實在太多了 講不完 所以挑重點作說明
我有省略一下比較難懂的部分 就這部分了 <Switches>
在搜尋列 輸入cmd 以系統管理員身份執行
然後先將路徑指向 這裡
C:\Windows\system32>cd\
C:\>cd Program Files
C:\Program Files>cd 7-Zip
C:\Program Files\7-Zip >
在此路徑 輸入 7-Zip 命令(指令)
C:\Program Files\7-Zip >7z -h
看這部分 要以微軟的 cmd 命令為準
<Switches>
-- : Stop switches and @listfile parsing
-ai[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : Include archives 綠色命令在這
-ax[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : eXclude archives
-ao{a|s|t|u} : set Overwrite mode
-an : disable archive_name field
-bb[0-3] : set output log level
-bd : disable progress indicator
-bs{o|e|p}{0|1|2} : set output stream for output/error/progress line
-bt : show execution time statistics
-i[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : Include filenames
-m{Parameters} : set compression Method
-mmt[N] : set number of CPU threads
-mx[N] : set compression level: -mx1 (fastest) ... -mx9 (ultra)
-o{Directory} : set Output directory
-p{Password} : set Password
-r[-|0] : Recurse subdirectories for name search
-sa{a|e|s} : set Archive name mode
-scc{UTF-8|WIN|DOS} : set charset for console input/output
-scs{UTF-8|UTF-16LE|UTF-16BE|WIN|DOS|{id}} : set charset for list files
-scrc[CRC32|CRC64|SHA256|SHA1|XXH64|*] : set hash function for x, e, h commands
-sdel : delete files after compression
-seml[.] : send archive by email
-sfx[{name}] : Create SFX archive
-si[{name}] : read data from stdin
-slp : set Large Pages mode
-slt : show technical information for l (List) command
-snh : store hard links as links
-snl : store symbolic links as links
-sni : store NT security information
-sns[-] : store NTFS alternate streams
-so : write data to stdout
-spd : disable wildcard matching for file names
-spe : eliminate duplication of root folder for extract command
-spf[2] : use fully qualified file paths
-ssc[-] : set sensitive case mode
-sse : stop archive creating, if it can't open some input file
-ssp : do not change Last Access Time of source files while archiving
-ssw : compress shared files
-stl : set archive timestamp from the most recently modified file
-stm{HexMask} : set CPU thread affinity mask (hexadecimal number)
-stx{Type} : exclude archive type
-t{Type} : Set type of archive
-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] : Update options
-v{Size}[b|k|m|g] : Create volumes
-w[{path}] : assign Work directory. Empty path means a temporary directory
-x[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : eXclude filenames
-y : assume Yes on all queries
The 7-Zip command-line switch cl=off disables the use of local code page for file names, while cu=on enables UTF-8 encoding for file names that contain non-ASCII symbols. The default behavior is that 7-Zip uses UTF-8 encoding only for file names containing non-ASCII symbols unless cl=off or cu=on are specified.
memuse=[ p{N_Percents} | {N}b | {N}k | {N}m | {N}g | {N}t]
Sets a limit on memory usage (RAM) for compressing and decompressing commands.
Default memory limits are 80% from RAM size for compressing and 53% for decompressing.
7-Zip tries to fit in specified memory limits by changing the number of working threads, if the number of threads was not specified in command. If 7-Zip cannot fit in specified memory limit, 7-Zip still exe-cutes the command.
為壓縮和解壓縮命令設置內存使用(RAM)的限制。默認的內存限制為壓縮內存使用的80%和解壓縮內存使用的53%。7-Zip會通過更改工作線程數量來適應指定的內存限制,如果命令中未指定線程數量。如果7-Zip無法適應指定的內存限制,7-Zip仍會執行該命令。
Example: 範例
memuse=p60
set the limit for memory usage to 60% of RAM size. 將記憶體使用上限設置為 RAM 大小的 60%.
e Use a separate solid block for each new file extension. You need to use qs option also. 對於每個新的檔案擴展名,使用一個單獨的固實區塊。你還需要使用 qs 選項 qs=on 參數設 s=e qs=on qs在後面 底下 有說明 請放心
{N}b | {N}k | {N}m | {N}g | {N}t Set a limit for the total size of a solid block in bytes / KiB / MiB / GiB / TiB. 設置固實區塊的總大小限制,以位元組 b / KiB / MiB / GiB / TiB 為單位。
The default solid block size depends on the compression method and the dictionary size. The default dictionary size depends on the compression level.
The default solid block size for all methods other than LZMA2 (LZMA, PPMD, BZIP2, Deflate, De-flate64) is caluclated by the formula:
NOTE: if LZMA2 is used, 7-Zip can split data into chunks and then it compresses those chunks simultaneously using multiple CPU threads. By default, there are 64 chunks in a solid block. LZMA2 encoder uses about 2 CPU threads per chunk at compression level 5 or higher. So by default LZMA2 encoder can use up to 128 CPU threads for compression, if CPU supports such number of threads. 7-Zip doesn't compress several solid blocks simultaneously to the 7z ar-chive. Thus, multitreading is provided only within a solid block of the 7z archive. If solid block is large, then there are more chunks in solid block, and LZMA encoder and decoder can use more cpu threads for compression and decompression.
注意:如果使用 LZMA2,7-Zip 可以將數據分割成多個區塊,然後同時使用多個 CPU 執行緒壓縮這些區塊。默認情況下,固實區塊中有 64 個區塊。在壓縮等級 5 或更高級別,LZMA2 編碼器大約使用每個區塊 2 個 CPU 執行緒。因此,根據默認設定,LZMA2 編碼器可以在 CPU 支持這麼多執行緒的情況下,使用最多 128 個 CPU 執行緒進行壓縮。7-Zip 不會同時壓縮多個固實區塊到 7z 壓縮檔案中。因此,多執行緒僅在 7z 壓縮檔案的一個固實區塊內提供。如果固實區塊很大,那麼固實區塊中會有更多的區塊,LZMA 編碼器和解碼器可以使用更多的 CPU 執行緒進行壓縮和解壓。
Limitation of the solid block size usually decreases compression ratio but gives the following advantages:
固實區塊大小的限制通常會降低壓縮比,但帶來以下優勢:
• it reduces data loss in case of future archive damage. 它減少未來檔案損壞時的數據損失
• it reduces extraction time of a group of files (or just one file), so long as the group doesn't contain the entire archive. 它減少一組文件(或僅一個文件)的提取時間,只要該組不包含整個檔案。
set solid mode with 100 files & 256 MB limits per one solid block for 7z format.
qs=[off | on]
Enables or disables sorting files by type in solid archives. The default mode is qs=off.
Old versions of 7-Zip (before version 15.06) used file sorting "by type" ("by extension").
New versions of 7-Zip (starting from version 15.06) support two sorting orders:
• qs- : sorting by name : it's default order.
• qs : sorting by type (by file extension).
You can get big difference in compression ratio for different sorting methods, if dictionary size is smaller than total size of files. If there are similar files in different folders, the sorting "by type" can provide better compression ratio in some cases.
Note that sorting "by type" has some drawbacks. For example, NTFS volumes use sorting or-der "by name", so if an archive uses another sorting, then the speed of some operations for files with unusual order can fall on HDD devices (HDDs have low speed for "seek" operations).
設置固體模式,對於 7z 格式的每個固實區塊限制 100 個文件和 256 MB。qs=[off | on]啟用或禁用在固體檔案中按類型排序文件。默認模式為 qs=off。舊版本的 7-Zip(在 15.06 版本之前)使用按類型(按擴展名)排序文件。新版本的 7-Zip(從 15.06 版本開始)支持兩種排序方式: qs- : 按名稱排序 : 這是默認排序。 qs : 按類型排序(按文件擴展名)。如果字典大小小於文件的總大小,則對於不同的排序方法,你可以獲得壓縮比的巨大差異。如果在不同文件夾中有相似的文件,則按類型排序在某些情況下可以提供更好的壓縮比。請注意,按類型排序有一些缺點。例如,NTFS 卷使用按名稱的排序順序,因此如果壓縮文件使用其他排序,則對於具有不尋常排序的文件,一些操作的速度可能會在 HDD 設備上下降(HDD 在尋找操作上速度較慢)。
If "qs" mode provides much better compression ratio than default "qs-" mode, you still can in-crease compression ratio for "qs-" mode by increasing of dictionary size.
If you think that unusual file order is not problem for you, and if better compression ratio with small dictionary is more important for you, use "qs" mode.
如果 "qs" 模式提供的壓縮比比默認的 "qs-" 模式好得多,您仍然可以透過增加字典大小來提高 "qs-" 模式的壓縮比。如果您認為不尋常的文件順序對您來說不是問題,而且如果小字典下更好的壓縮比對您來說更重要,那麼請使用 "qs" 模式。
Note: There are some files (for example, executable files), that are compressed with additional filter. 7-Zip can't use different compression methods in one solid block, so 7-zip can create several groups of files that don't follow "by name" order in "qs-" mode, but files inside each group are still sorted by name in "qs-" mode.
f=[off | on | FilterID]
Enables or disables compression filters. The default mode is f=on, when 7-zip uses filter for some files: executables files (dll, exe, ocx, sfx, sys) and wav files. for x86 executables it can use BCJ2 filter in Ultra (x9) mode and BCJ filter in other modes. If f=FilterID if specified, 7-zip uses specified filter for all files. FilterID can be: Delta:{N}, BCJ, BCJ2, ARM64, ARM, ARMT, RISCV, IA64, PPC, SPARC.
hc=[off | on]
Enables or disables archive header compressing. The default mode is hc=on. If archive header compressing is enabled, the archive header will be compressed with LZMA method.
he=[off | on]
Enables or disables archive header encryption.
The default mode is he=off (archive header encryption is disabled).
The archive header contains metadata of the stored files (file names, file sizes, timestamps, at-tributes) and other additional archive metadata information.
If archive header encryption option is disabled (he=off), the archive header will be stored without encryption. If archive header encryption option is enabled (he=on), and a password is specified (-p switch on the command line or the password entered in the "Password" field in the GUI), then both file data and headers will be encrypted.
C:\Program Files\7-Zip>7z a -pcyn -mhe=on e:\bc\s.7z e:\raw
在路徑 輸入這行即可 7z a -pcyn -mhe=on e:\bc\s.7z e:\raw
b{C1}[s{S1}]:{C2}[s{S2}]
Binds output stream S1 in coder C1 with input stream S2 in coder C2. If stream number is not specified, stream with number 0 will be used.
Usally coder has one input stream and one output stream. In 7z some coders can have multiple input and output streams.
For example, BCJ2 encoder has one input stream and four output streams.
mt=[off | on | {N}]
Sets multithread mode. If you have a multiprocessor or multicore system, you can get a in-crease with this switch. 7-Zip supports multithread mode only for LZMA / LZMA2 compres-sion and BZip2 compression / decompression. If you specify {N}, for example mt=4, 7-Zip tries to use 4 threads. LZMA compression uses only 2 threads.
MethodID Description
LZMA LZ-based algorithm
LZMA2 LZMA-based algorithm
PPMd Dmitry Shkarin's PPMdH with small changes
BZip2 BWT algorithm
Deflate LZ+Huffman
Copy No compression
Supported filters: 支援的過濾器:
MethodID Description
Delta
Delta filter
BCJ converter for x86 executables
BCJ2
converter for x86 executables (version 2)
ARM64 converter for ARM64 (little endian) executables
ARM converter for ARM (little endian) executables
ARMT converter for ARM Thumb (little endian) executa-bles
RISCV converter for RISC-V executables
IA64 converter for IA-64 executables
PPC converter for PowerPC (big endian) executables
SPARC converter for SPARC executables
Filters increase the compression ratio for some types of files. Filters must be used with one of the compression method (for example, BCJ + LZMA).
過濾器提高了某些類型文件的壓縮比。過濾器必須與某種壓縮方法一起使用(例如,BCJ + LZMA)。
LZMA
LZMA is an algorithm based on Lempel-Ziv algorithm. It provides very fast decompression (about 10-20 times faster than compression). Memory requirements for compression and de-compression also are different (see d={Size}[b|k|m|g] switch for details).
LZMALZMA 是基於 Lempel-Ziv 算法的算法。它提供非常快速的解壓縮(大約比壓縮快 10-20 倍)。壓縮和解壓縮的內存需求也不同(詳情請參見 d={Size}[b|k|m|g] 參數)。
d={Size}[b|k|m|g]
Sets Dictionary size for LZMA. You must specify the size in bytes, kilobytes, or megabytes. The maximum value for dictionary size is 3840 MiB (4 GB), but 32-bit version of 7-Zip allows to specify up to 128 MB dictionary. Default dictionary size values for LZMA in 64-bit 7-Zip are 25 (32 MB) in normal mode (-mx=5), 27 (128 MB) in maximum mode (-mx=7) and 28 (256 MB) in ultra mode (-mx=9). The default dictionary size for 32-bit 7-Zip does not exceed 64 MB. If you do not specify any symbol from the set [b|k|m|g], the dictionary size will be cal-culated as DictionarySize = 2^Size bytes. For decompressing a file compressed by LZMA method with dictionary size N, you need about N bytes of memory (RAM) available.
d={Size}[b|k|m|g]設置 LZMA 的字典大小。您必須以字節、千字節或兆字節指定大小。字典大小的最大值為 3840 MiB (4 GB),但 32 位版本的 7-Zip 允許指定最多 128 MB 的字典。在 64 位 7-Zip 中,LZMA 的默認字典大小值在正常模式下 (-mx=5) 為 25 (32 MB),在最大模式下 (-mx=7) 為 27 (128 MB),在超級模式下 (-mx=9) 為 28 (256 MB)。32 位 7-Zip 的默認字典大小不超過 64 MB。如果您不指定任何符號來自於[b|k|m|g]的集合,則字典大小將計算為 DictionarySize = 2^Size 字節。對於使用字典大小 N 的 LZMA 方法壓縮的文件進行解壓時,您需要大約 N 字節的內存 (RAM) 可用。
d={Size}[b|k|m|g] d={Size}[b|k|m] d=900000b d=262144k d=256m
d=900000{Size}b= d=900000b
Parameter De-fault Description
a=[0|1]
1 Sets compressing mode
d={Size}[b|k|m|g]
25 Sets Dictionary size
mf={MF_ID}
bt4 Sets Match Finder
fb={N}
32 Sets number of Fast Bytes
mc={N}
32 Sets Number of Cycles for Match Finder
lc={N}
3 Sets number of Literal Context bits - [0, 8]
lp={N}
0 Sets number of Literal Pos bits - [0, 4]
pb={N}
2 Set number of Pos Bits - [0, 4]
d={Size}[b|k|m|g]
Sets Dictionary size for LZMA. You must specify the size in bytes, kilobytes, or megabytes. The maximum value for dictionary size is 3840 MiB (4 GB), but 32-bit version of 7-Zip allows to specify up to 128 MB dictionary. Default dictionary size values for LZMA in 64-bit 7-Zip are 25 (32 MB) in normal mode (-mx=5), 27 (128 MB) in maximum mode (-mx=7) and 28 (256 MB) in ultra mode (-mx=9). The default dictionary size for 32-bit 7-Zip does not exceed 64 MB. If you do not specify any symbol from the set [b|k|m|g], the dictionary size will be cal-culated as DictionarySize = 2^Size bytes. For decompressing a file compressed by LZMA method with dictionary size N, you need about N bytes of memory (RAM) available.
設置 LZMA 的字典大小。您必須以位元組、千位元組或百萬位元組指定大小。字典大小的最大值為 3840 MiB(4 GB),但 32 位元版本的 7-Zip 允許指定最多 128 MB 的字典。64 位元 7-Zip 中 LZMA 的默認字典大小值在正常模式下(-mx=5)為 25(32 MB),在最大模式下(-mx=7)為 27(128 MB),在超高模式下(-mx=9)為 28(256 MB)。32 位元 7-Zip 的默認字典大小不超過 64 MB。如果您未指定集合中的任何符號 [b|k|m|g],則字典大小將按字典大小 = 2^大小位元組計算。要解壓縮使用字典大小 N 進行壓縮的 LZMA 方法的文件,您需要大約 N 位元組的可用內存(RAM)。
64 位元 7-Zip 中 LZMA 在最大模式下(128 MB) -m0=LZMA d=128m 字典大小值
mf={MF_ID}
Sets Match Finder for LZMA. Default method is bt4. Algorithms from hc* group don't provide a good compression ratio, but they often work pretty fast in combination with fast mode (a=0). Memory requirements depend on dictionary size (parameter "d" in table below).
為 LZMA 設定匹配查找器。預設方法為 bt4。hc* 組的算法雖然不提供良好的壓縮比,但在與快速模式(a=0)結合使用時通常運行得相當快。內存需求取決於字典大小(下表中的參數 "d")。
MF_ID Dictionary Memory Us-age Description
bt2 9.5 * d + 4 MB Binary Tree 2 bytes hashing
bt3 11.5 * d 3 bytes hashing
bt4
bt5 64 KB ... 48 MB 11.5 * d 4/5 bytes hash-ing
64 MB ... 1024 MB 10.5 * d
hc4
hc5 64 KB ... 48 MB 7.5 * d Hash Chain
64 MB ... 1024 MB 6.5 * d
Note: Your operation system also needs some amount of physical memory for internal purpos-es. So keep at least 32MB of physical memory unused.
fb={N}
Sets number of fast bytes for LZMA. It can be in the range from 5 to 273. The default value is 32 for normal mode and 64 for maximum and ultra modes. Usually, a big number gives a little bit better compression ratio and slower compression process.
為LZMA設置快速字元的數量。其範圍可以在5到273之間。默認值為正常模式下的32和最大及超級模式下的64。通常,大數字會帶來稍微更好的壓縮率,但壓縮過程也會變慢。
-m0=LZMA fb=64
mc={N}
Sets number of cycles (passes) for match finder. It can be in range from 0 to 1000000000. De-fault value is (16 + number_of_fast_bytes / 2) for BT* match finders and (8 + num-ber_of_fast_bytes / 4) for HC4 match finder. If you specify mc=0, LZMA will use default val-ue. Usually, a big number gives a little bit better compression ratio and slower compression process. For example, mf=HC4 and mc=10000 can provide almost the same compression ratio as mf=BT4.
設置匹配查找器的循環次數(通過數)。範圍可以從 0 到 1000000000。對於 BT* 匹配查找器的預設值為 (16 + fast_bytes 數量 / 2),對於 HC4 匹配查找器的預設值為 (8 + fast_bytes 數量 / 4)。如果您指定 mc=0,則 LZMA 將使用預設值。通常,較大的數字會提供稍微更好的壓縮比,但壓縮過程會較慢。例如,mf=HC4 和 mc=10000 的壓縮比幾乎可以與
當你設置 mc=0 時,實際上是讓 LZMA 使用 bt4 作為匹配查找器,這是其 預設配置。
bt4 Dictionary字典大小 64 KB ... 48 MB 記憶體使用 11.5 * d + 4 MB
lc={N}
Sets the number of literal context bits (high bits of previous literal). It can be in range from 0 to 8. Default value is 3. Sometimes lc=4 gives gain for big files
設置字面上下文位元的數量(前一個字面的高位元)。範圍可以從 0 到 8。預設值為 3。有時 lc=4 對於大型檔案有所增益。
lc=8
lp={N}
Sets the number of literal pos bits (low bits of current position for literals). It can be in the range from 0 to 4. The default value is 0. The lp switch is intended for periodical data when the period is equal to 2^value (where lp=value). For example, for 32-bit (4 bytes) periodical data you can use lp=2. Often it's better to set lc=0, if you change lp switch.
設定字面位置位元的數量(當前位置的低位元,用於字面量)。它的範圍可以從0到4。默認值為0。lp開關是針對週期性資料而設計的,當週期等於2^value(其中lp=value)。例如,對於32位(4字節)週期性資料,您可以使用lp=2。通常,如果您改變lp開關,最好將lc設為0。
1p=0
pb={N}
Sets the number of pos bits (low bits of current position). It can be in the range from 0 to 4. The default value is 2. The pb switch is intended for periodical data when the period is equal 2^value (where lp=value).
LZMA2
LZMA2 is modified version of LZMA. it provides the following advantages over LZMA:
• Better compression ratio for data than can't be compressed. LZMA2 can store such blocks of data in uncompressed form. Also it decompresses such data faster.
• Better multithreading support. If you compress big file, LZMA2 can split that file to chunks and compress these chunks in multiple threads.
LZMA2 是 LZMA 的修改版本。它提供了以下對 LZMA 的優勢:對於無法壓縮的數據,具有更好的壓縮比。LZMA2 可以將這些數據塊以未壓縮的形式存儲,並且對這些數據的解壓速度更快。 更好的多線程支持。如果您壓縮大型文件,LZMA2 可以將該文件分割成幾個塊,並在多個線程中壓縮這些塊。
• c:這是設置字典大小的參數。
• {Size}:是字典的大小數值。
• [b|k|m|g]:這是字典大小的單位,分別代表:
If you don't specify ChunkSize, default ChunkSize is caluclated by the formula:
ChunkSize = max(DictionarySize, min(256M, max(1M, DictionarySize * 4)))
LZMA2 also supports all LZMA parameters, but lp+lc cannot be larger than 4.
LZMA2 uses: 1 thread for each chunk in x1 and x3 modes; and 2 threads for each chunk in x5, x7 and x9 modes. If LZMA2 is set to use only such number of threads required for one chunk, it doesn't split stream to chunks. So you can get different compression ratio for different num-ber of threads. You can get the best compression ratio, when you use 1 or 2 threads.
PPMd
PPMd is a PPM-based algorithm. This algorithm is mostly based on Dmitry Shkarin's PPMdH source code. PPMd provides very good compression ratio for plain text files. There is no dif-ference between compression speed and decompression speed. Memory requirements for compression and decompression also are the same.
Sets the size of memory used for PPMd. You must specify the size in bytes, kilobytes, or meg-abytes. The maximum value is 2GB = 2^31 bytes. The default value is 24 (16MB). If you do not specify any symbol from the set [b|k|m|g], the memory size will be calculated as (2^Size) bytes. PPMd uses the same amount of memory for compression and decompression.
設置 PPMd 使用的記憶體大小。您必須以字節、千字節或兆字節指定大小。最大值為 2GB = 2^31 字節。預設值為 24(16MB)。如果您未指定集 [b|k|m|g] 中的任何符號,則記憶體大小將計算為 (2^Size) 字節。PPMd 在壓縮和解壓縮時使用相同量的記憶體。
o={Size}
Sets the model order for PPMd. The size must be in the range [2,32]. The default value is 6.
o={大小} 設定PPMd的模型順序。大小必須在[2,32]範圍內。預設值為6。
XZ
XZ supports only LZMA2 codec now. The switches are similar to switches for 7z format.
XZ 目前只支持 LZMA2 編解碼器。這些開關與 7z 格式的開關類似。
XZ 是一種基於 LZMA2 算法的壓縮格式,它與 .tar.xz 等檔案格式經常搭配使用,廣泛應用於 Linux 等系統。
這裡將介紹如何在 7-Zip 中使用 XZ 壓縮格式以及一些有用的參數。
Parameter De-fault Description
x=[1 | 3 | 5 | 7 | 9 ] 5 Sets level of compression
f=FilterID Sets compression filter. FilterID: Delta:{N}, BCJ, ARM64, ARM, ARMT, RISCV, IA64, PPC, SPARC
{N}={MethodID}[:param1][:param2][..] LZMA2 Sets compression method: LZMA2:[param1]:[param2]:[...]
mt=[off | on | {N}] on Sets multithreading mode
s=[off | on | [{N}b | {N}k | {N}m | {N}g | {N}t]]
off Sets solid mode.
s=[off | on | [{N}b | {N}k | {N}m | {N}g | {N}t]]
Enables or disables solid mode. The default mode is s=off. In solid mode, there is only one block per file or stream.
{N}b | {N}k | {N}m | {N}g Set a limit for the total size of a solid block in bytes
If size of solid block is not specified, the default value of solid block size will be calculated, The default solid block size depends on the dictionary size. The default dictionary size de-pends on the compression level.
The default solid block size is caluclated by the formula:
SolidBlockSize_xz = max(DictionarySize, min(256M, max(1M, DictionarySize * 4)))
啟用或禁用固體模式。默認模式為 s=off。在固體模式下,每個文件或流僅有一個區塊。{N}b | {N}k | {N}m | {N}g 設置固體區塊的總大小限制(字節)。如果未指定固體區塊的大小,將計算默認的固體區塊大小,默認的固體區塊大小取決於字典大小。默認字典大小取決於壓縮級別。默認固體區塊大小的計算公式為:SolidBlockSize_xz = max(DictionarySize, min(256M, max(1M, DictionarySize * 4)))
字典大小
dictionary_size
預設固實區塊大小
Default solid block size
smaller than 256 KB 1 MB
256 KB - 64 MB dictionary_size * 4
64 MB - 256 MB 256 MB
larger than 256 MB dictionary_size
block size must be equal or large than dictionary size.
If you use multiple blocks:
• the compression ratio with small blocks usually is worse.
區塊大小必須等於或大於字典大小。如果您使用多個區塊: 通常小區塊的壓縮比會較差。
• blocks are independent. So losses in case of data damage is limited only to damaged blocks.
• it's possible to extract some particular block of data faster.
• there is index record at the end of xz stream that contains information about position and size of each block.
• • 區塊是獨立的。因此,數據損壞的損失僅限於受損的區塊。• 可以更快地提取某個特定的數據區塊。• 在 xz 流的末尾有索引記錄,包含有關每個區塊的位置和大小的信息。
Note: xz uses: 1 thread for each block in x1 and x3 modes; and 2 threads for each block in x5, x7 and x9 modes. If xz is set to use only such number of threads required for one block, it doesn't split stream to blocks. So you can get different compression ratio for different number of threads. You can get the best compression ratio, when you use 1 thread (for x1 and x3 modes) or 2 threads (for x5, x7 and x9 modes).
Note: each xz block contains LZMA2 stream of data. And LZMA2 also can be divided to in-dependent blocks (chunks). The difference between xz blocks and LZMA2 blocks, that each xz block contains also checksum (crc or sha), and there is index record at the end of xz stream that points to each xz block. 7-Zip by default uses xz blocks. But it's possible to specify the mode when it will use one xz block, and multiple LZMA2 blocks instead.
use one solid xz block per file and 16 MiB LZMA2 blocks.
WIM
Parameter De-fault Description
im={ImageNumber}
Sets image number.
is=[off | on] off Show image number in paths.
tm=[off | on] on Stores last Modified timestamps for files.
tc=[off | on] off Stores Creation timestamps for files.
ta=[off | on] off Stores last Access timestamps for files.
If image number is specified, 7-Zip works only with that image inside WIM archive. Other im-ages will be not changed. By default 7-Zip doesn't show image number, if there is only one image in WIM archive, or if image number is specified. But if the switch "is" specified, 7-Zip shows image number.
如果指定了映像號碼,7-Zip 只處理 WIM 包檔案內的該映像。其他映像將不會被修改。默認情況下,當 WIM 包檔案中只有一個映像,或是指定了映像號碼時,7-Zip 不會顯示映像號碼。但如果指定了開關"is",7-Zip 會顯示映像號碼。
7-Zip 也支援壓縮和解壓 .WIM(Windows Imaging Format)格式的檔案。WIM 檔案通常用於備份、安裝映像或系統恢復,它是 Microsoft 用來存儲 Windows 系統映像的格式。
Examples
7z a archive.zip *.jpg -mx0
adds *.jpg files to archive.zip archive without compression.
7z a archive.7z *.exe *.dll -m0=BCJ -m1=LZMA:d=21
adds *.exe and *.dll files to solid archive archive.7z using LZMA method with 2 MB diction-ary and BCJ filter.
7z a archive.7z a.tar -mf=BCJ2 -mx
adds a.tar files to archive archive.7z using BCJ2 filter.
7z a archive.7z *.wav -mf=Delta:4
adds *.wav files to archive archive.7z using Delta:4 filter.
7z a a.7z *.exe *.dll -m0=BCJ2 -m1=LZMA:d25 -m2=LZMA:d19 -m3=LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3
adds *.exe and *.dll files to archive a.7z using BCJ2 filter, LZMA with 32 MB dictionary for main output stream (s0), and LZMA with 512 KB dictionary for s1 and s2 output streams of BCJ2.
7z a archive.7z *.txt -m0=PPMd
adds *.txt files to archive archive.7z using PPMd method.
7z a a.tar.xz a.tar -mf=bcj -mx
adds a.tar files to archive a.tar.xz using BCJ filter.
Commands that can be used with this switch
a (Add), h (Hash), d (Delete), rn (Rename), u (Update)
See also
Switches: -t (set Type of archive),
-ao{a|s|t|u} : set Overwrite mode
-an : disable archive_name field
-bb[0-3] : set output log level
-bd : disable progress indicator
-bs{o|e|p}{0|1|2} : set output stream for output/error/progress line
-bt : show execution time statistics
-i[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : Include filenames
-m{Parameters} : set compression Method
-mmt[N] : set number of CPU threads
-mx[N] : set compression level: -mx1 (fastest) ... -mx9 (ultra)
-o{Directory} : set Output directory
-p{Password} : set Password
-r[-|0] : Recurse subdirectories for name search
-sa{a|e|s} : set Archive name mode
-scc{UTF-8|WIN|DOS} : set charset for console input/output
-scs{UTF-8|UTF-16LE|UTF-16BE|WIN|DOS|{id}} : set charset for list files
-scrc[CRC32|CRC64|SHA256|SHA1|XXH64|*] : set hash function for x, e, h commands
-sdel : delete files after compression
-seml[.] : send archive by email
-sfx[{name}] : Create SFX archive
-si[{name}] : read data from stdin
-slp : set Large Pages mode
-slt : show technical information for l (List) command
-snh : store hard links as links
-snl : store symbolic links as links
-sni : store NT security information
-sns[-] : store NTFS alternate streams
-so : write data to stdout
-spd : disable wildcard matching for file names
-spe : eliminate duplication of root folder for extract command
-spf[2] : use fully qualified file paths
-ssc[-] : set sensitive case mode
-sse : stop archive creating, if it can't open some input file
-ssp : do not change Last Access Time of source files while archiving
-ssw : compress shared files
-stl : set archive timestamp from the most recently modified file
-stm{HexMask} : set CPU thread affinity mask (hexadecimal number)
-stx{Type} : exclude archive type
-t{Type} : Set type of archive
-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] : Update options
-v{Size}[b|k|m|g] : Create volumes
-w[{path}] : assign Work directory. Empty path means a temporary directory
-x[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : eXclude filenames
-y : assume Yes on all queries
<Commands>
a : Add files to archive
b : Benchmark
d : Delete files from archive
e : Extract files from archive (without using directory names)
h : Calculate hash values for files
i : Show information about supported formats
l : List contents of archive
rn : Rename files in archive
t : Test integrity of archive
u : Update files to archive
x : eXtract files with full paths
<Switches>
-- : Stop switches and @listfile parsing
-ai[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : Include archives
-ax[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : eXclude archives
-ao{a|s|t|u} : set Overwrite mode
-an : disable archive_name field
-bb[0-3] : set output log level
-bd : disable progress indicator
-bs{o|e|p}{0|1|2} : set output stream for output/error/progress line
-bt : show execution time statistics
-i[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : Include filenames
-m{Parameters} : set compression Method
-mmt[N] : set number of CPU threads
-mx[N] : set compression level: -mx1 (fastest) ... -mx9 (ultra)
-o{Directory} : set Output directory
-p{Password} : set Password
-r[-|0] : Recurse subdirectories for name search
-sa{a|e|s} : set Archive name mode
-scc{UTF-8|WIN|DOS} : set charset for console input/output
-scs{UTF-8|UTF-16LE|UTF-16BE|WIN|DOS|{id}} : set charset for list files
-scrc[CRC32|CRC64|SHA256|SHA1|XXH64|*] : set hash function for x, e, h commands
-sdel : delete files after compression
-seml[.] : send archive by email
-sfx[{name}] : Create SFX archive
-si[{name}] : read data from stdin
-slp : set Large Pages mode
-slt : show technical information for l (List) command
-snh : store hard links as links
-snl : store symbolic links as links
-sni : store NT security information
-sns[-] : store NTFS alternate streams
-so : write data to stdout
-spd : disable wildcard matching for file names
-spe : eliminate duplication of root folder for extract command
-spf[2] : use fully qualified file paths
-ssc[-] : set sensitive case mode
-sse : stop archive creating, if it can't open some input file
-ssp : do not change Last Access Time of source files while archiving
-ssw : compress shared files
-stl : set archive timestamp from the most recently modified file
-stm{HexMask} : set CPU thread affinity mask (hexadecimal number)
-stx{Type} : exclude archive type
-t{Type} : Set type of archive
-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] : Update options
-v{Size}[b|k|m|g] : Create volumes
-w[{path}] : assign Work directory. Empty path means a temporary directory
-x[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : eXclude filenames
-y : assume Yes on all queries
7-Zip 提取檔案
將E槽 ok資料夾底下的 Wonderful.7z.001分割檔 提取檔案到 E槽的 ck資料夾
C:\Program Files\7-Zip>7z x e:\ok\Wonderful.7z.001 -oe:\ck 注意-oe 中間不能有空格