Search code examples
7ziplzma

Listing the contents of a LZMA compressed file?


Is it possible to list the contents of a LZMA file (.7zip) without uncompressing the whole file? Also, can I extract a single file from the LZMA file?

My problem: I have a 30GB .7z file that uncompresses to >5TB. I would like to manipulate the original .7z file without needing to do a full uncompress.


Solution

  • Yes. Start with XZ Utils. There are Perl and Python APIs.

    You can find the file you want from the headers. Each file is compressed separately, so you can extract just the one you want.