Questions tagged [7zip]

"7z" or "7-Zip" may refer either to the open-source 7z compression container format or to the file name of the executable program of the same name that is the flagship implementation of the compression format. Both are GPL-licensed and under active development.

"7z" or "7-Zip" may refer either to the open-source 7z compression container format or to the file name of the executable program of the same name that is the flagship implementation of the compression format. Both are GPL-licensed and under active development.

The 7z format is a compressed archive file format that supports several different data compression, encryption and pre-processing algorithms. The LZMA SDK 4.62 was placed in the public domain in December 2008. The latest stable version of 7-Zip and LZMA SDK is version 18.05. The MIME type of 7z is application/x-7z-compressed.

The 7-Zip program is an open source file archiver. 7-Zip operates with the 7z archive format, but can read and write several other archive formats. The program can be used from a command line interface, graphical user interface, or with Microsoft Windows shell integration. 7-Zip's development began in 1999, and it is actively developed by Igor Pavlov. It is related to a cross-platform port, p7zip. 7-Zip is free software distributed under the GNU Lesser General Public License (LGPL). It was the winner of the SourceForge.net 2007 community choice awards for "Technical Design" and for "Best Project".

7z has an open architecture, so it can support any new compression methods. Now the following methods are integrated to 7z:

  1. LZMA: Improved and optimized version of LZ77 algorithm
  2. LZMA2: Improved version of LZMA
  3. PPMD: Dmitry Shkarin's PPMdH with small changes
  4. BCJ: Converter for 32-bit x86 executables
  5. BCJ2: Converter for 32-bit x86 executables
  6. BZip2: Standard BWT algorithm
  7. Deflate: Standard LZ77-based algorithm
1441 questions
16
votes
1 answer

apache commons compress using 7zip

i am trying to use the below code that i got from apache commons compress examples webpage to create a zip file using the sevenZ classes hoping it would be faster to compress than regular java zip. this is what my code looks like public static void…
md1980
  • 319
  • 1
  • 8
  • 21
16
votes
5 answers

zipping files with the same name in different folders using 7z @listfile feature

I want to create a 7zip file containing files with the same names but in different folders using 7zip's @listfile feature. Although I have used 7zip CLI for a long time, I just cannot find the syntax to accomplish this. My file tree looks like this…
jockster
  • 397
  • 1
  • 3
  • 10
15
votes
5 answers

unzip file using 7z in powershell

What is the command to unzip a file using 7z in powershell? set-alias sz "$env:ProgramFiles\7-Zip\7z.exe" sz x $zipfilePath $destinationUnzipPath -aoa -r; The command works fine but it says no files to process, everything is Ok rather than…
Deepanshu Kalra
  • 419
  • 2
  • 9
  • 23
15
votes
1 answer

What's the difference between 7z and lzma compressors?

7-Zip claims using LZMA as the compression algorithm. However, the LZMA SDK comes with two executables, 7zr.exe and lzma.exe, which have different options/switches and which produce different results which are not interchangeble, even though they…
Carles Sala
  • 1,989
  • 1
  • 16
  • 34
14
votes
1 answer

7z extension for php?

I can't find one and I don't know if any of PHP Compression and Archive Extensions will work. Do you think I could use a compression stream to read data from a 7z file? UPDATE 7z forums have a lot of requests for a php extension
Elzo Valugi
  • 27,240
  • 15
  • 95
  • 114
14
votes
2 answers

How to programmatically count the number of files in an archive using python

In the program I maintain it is done as in: # count the files in the archive length = 0 command = ur'"%s" l -slt "%s"' % (u'path/to/7z.exe', srcFile) ins, err = Popen(command, stdout=PIPE, stdin=PIPE, …
Mr_and_Mrs_D
  • 32,208
  • 39
  • 178
  • 361
14
votes
1 answer

7zip 7za.exe - cannot use absolute pathnames

Just curious to know if anyone has tried extracting a zip file using 7-zip's 7za.exe to a different location 7za.exe x sample.zip c:\Temp gives an error Cannot use absolute pathnames for this command
blue piranha
  • 3,706
  • 13
  • 57
  • 98
13
votes
4 answers

7zip: Exclude hidden directories

How do I exclude hidden directories when creating an archive using 7zip's command line version? I tried -x!".*", but that didn't work.
nQk
  • 165
  • 1
  • 2
  • 6
13
votes
2 answers

Zip / 7zip Compression Differences

I have a number of zip files that I need to distribute to users, around 130 of them. Each zip file contains a number of similar text, html, xml, and jpg files. In total, the zip files total 146 megabytes; unzipped, their contents total 551mb. I want…
Colen
  • 13,428
  • 21
  • 78
  • 107
13
votes
7 answers

Invoke-Expression with exe in Program Files

I'm trying to run a Powershell command to call 7-Zip to zip up a folder using the following command: $command = $SevenZip + " a " + $targetDirForZip + $GetDateName + "_" + $dir.Name + ".7z " + $dir.FullName Invoke-Expression $command The variables…
Guy
  • 65,082
  • 97
  • 254
  • 325
13
votes
2 answers

7Zip add encryption to files

I have a .7z archive that I manage using 7zFM (File Manager) and I can easily add objects to this archive. However the objects in the archive are encrypted with AES like I want them to be, but when I add something new I cannot seem to add encryption…
Parad0x13
  • 2,007
  • 3
  • 23
  • 38
13
votes
2 answers

Example of how to use PyLZMA

I want to use PyLZMA to extract a file from an archive (e.g. test.7z) and extract it to the same directory. I'm a newbie to Python and have no idea how to start. I've done some googling and found some examples and docs, but I don't understand how…
Philipp Bammes
  • 525
  • 1
  • 6
  • 25
12
votes
2 answers

How to Rename Files and Folder in .rar .7z, .tar, .zip using C#

I have a compressed file .rar .7z, .tar and .zip and I want to rename physical file name available in above compressed archived using C#. I have tried this using a sharpcompress library but I can't find such a feature for rename file or folder name…
Nikunj Satasiya
  • 831
  • 9
  • 25
12
votes
1 answer

extract 7z file using python 3

I was trying to decompress a 7z file using python, but I can't seem to figure it out. I figured I could use the lzma module in python 3, but I can't seem to figure it out: I thought it would work like the zipfile package: import lzma with…
code base 5000
  • 3,812
  • 13
  • 44
  • 73
12
votes
2 answers

Extract zip contents into directory with same name as zip file, retain directory structure

I would like to write a bat script to do the following: Use 7 Zip to extract files from an existing zip file, into a folder by the same name as the original zip file (bar the .zip extension), and keeping the file & directory structure that was…
Harriet
  • 1,633
  • 5
  • 22
  • 36
1 2
3
95 96