views:

54

answers:

1

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
+2  A: 

The 7z file format can use various compression algorithms, so you might be able to decompress the archive with one of the existing utilities for bzip2 or deflate.

I found a 7z PHP class as well, and you are lucky since it's still being developed. Here is the latest version.

bobdiaes
"At this moment it has been tested only on Linux, and restricts itself to listing an archive's contents. It can also return the Content-Type of all files. It can also return the Charset + contents of `text/...' files. It can also return the content of archives stored within the Archive."
Elzo Valugi
Well that's better than nothing, I guess. Perhaps using the [LZMA SDK](http://www.7-zip.org/sdk.html) and [SWIG for PHP](http://www.swig.org/Doc1.3/Php.html) could be an easy way to make a 7z extension. Although, I'm not sure that's considerably better than using a command-line program through exec().
bobdiaes
you are right. not much better
Elzo Valugi