This article is a mirror article of machine translation, please click here to jump to the original article.

View: 808|Reply: 3

[linux] Linux compression zip, 7z extreme compression (minimum file)

[Copy link]
Posted on 12/4/2025 3:06:20 PM | | |
Requirements: In the Linux server, a single file needs to be compressed, and then migrated to a new server, because the server configuration is very high, the transmission is over the public network, and the bandwidth becomes a bottleneck. Therefore, in the pursuit of ultimate compression, the smaller the file, the better.

zip command

The zip command supports specifying the compression level with options "-1" to "-9". A higher number indicates a higher compression ratio, but also an increase in the time spent. For example, using the "-9" option for the highest compression level can get the best compression results.

7z command

First, the installation command is as follows:
The Ubuntu system installation command is as follows:
With the LZMA compression algorithm, the importance of data compression technology is becoming increasingly prominent as the volume of data continues to grow. LZMA (Lempel-Ziv-Markov chain-Algorithm) is an efficient data compression algorithm that has been widely used in many fields. The LZMA algorithm, which stands for Lempel-Ziv-Markov chain Algorithm, is an algorithm for lossless data compression. It was developed by Igor Pavlov in 1996 or 1998 and was first used in the 7z format of the 7-Zip compression software. The LZMA algorithm uses a dictionary compression scheme, similar to the LZ77 algorithm published by Abraham Lempel and Jacob Ziv in 1977, but LZMA applies a modified LZ77 algorithm at the bit level rather than the byte level.

The command is as follows:
MeasurementA 980M file is compressed to 8.5M

Reference:The hyperlink login is visible.




Previous:Charles Proxy Scraping HTTPS Packet Tutorial
Next:Linux virtual memory swap partition configuration tutorial
 Landlord| Posted on 12/24/2025 3:19:11 PM |
LZMA2 is an improved version of the LZMA algorithm that supports multi-threading, which is much faster when compressed to be about the same size. The command is as follows:

Parameter description: Using LZMA2 algorithm, compression level is 9 (extreme compression), dictionary size is 64MB, word size is 64, and multi-threading support is enabled.

Reference:
The hyperlink login is visible.
The hyperlink login is visible.
 Landlord| Posted on 12/24/2025 5:28:04 PM |
Compress the entire folder command:



 Landlord| Posted on 12/26/2025 10:04:41 AM |
.NET/C# uses 7z (SharpSevenZip) to compress backup folders
https://www.itsvse.com/thread-11163-1-1.html
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com