7z (.7z)
- Import fully supports the 7z format.
- Import can work with general 7z archives, as well as with specific application formats consisting of multiple related files.
Background & Context
-
- Registered MIME type: application/x-7z-compressed
- Data compression and archival format.
- Used to reduce storage space and transfer times.
- Binary format.
- Can contain multiple files.
- Supports a variety of compression methods.
- Published by Igor Pavlov in 1999.
Import
- When importing files from a 7z archive, the specific converter for each format will be used.
- Import["file.7z"] returns an expression of the form {"fn1", "fn2",…}, giving full path specifications for all files in "file.7z".
- Import["file.7z",elem] imports the specified element from a 7z file.
- Import["file.7z","fn"] extracts "fn" from the archive and imports it.
- Import["file.7z",{elem,suba,subb,…}] imports a subelement.
- Import["file.7z",{{elem1,elem2,…}}] imports multiple elements.
- Import["file","7z"] or Import["file",{"7z",elem,…}] imports any file as a 7z archive.
- See the following reference pages for full general information:
-
Import import from a file CloudImport import from a cloud object ImportString import from a string ImportByteArray import from a byte array
Import Elements
- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - The following can be used to select or specify individual files in a 7z archive:
-
"FileNames" list of filenames representing the contents of a 7z archive "filename" a single file "filename","format" a single file, taken to be in the specified format "filename","format",elem element elem from the specified file - Import by default uses the "FileNames" element for the 7z format.
- Import["file.7z","fn"] extracts and imports file "fn".
- File names can include relative or absolute directory specifications and the abbreviated string patterns supported by StringMatchQ.
- Import["file.7z","*"] imports an entire archive.
- Import["file.7z","dir/*.jpg"] imports all JPEG files from subdirectory dir.