0

When using zipx with xz, zip format will be same, only compression method changes to 5F, right? But my doubt is, when i want to compress a folder with multiple file, how does zip do it using xz? Because, xz only supports to compress one single file.. So winzip might have to do some operation to make the folder and its contents to a single file (operation like tar or cpio) So what METHOD does it use to archieve all the files into a single one? We tried to zip the folder with no compression to make it to one file, and apply xz on that, but we need to unzip twice to get the orginal folder. How does zipx do it in one unzip?

theCrow
  • 176
  • 3
  • 13

1 Answers1

2

The zip file format compresses each file individually. So it can use xz for that, no problem, which compresses one file. The zip format is individual file compression followed by archiving. Things like .tar.gz or .tar.xz are the opposite, which is archiving followed by compression of the entire archive.

Mark Adler
  • 101,978
  • 13
  • 118
  • 158
  • But in zipx format if you check the file, you can notice that zip local header - xz header - compressed data - xz footer - zip Central header - zip Central director record. So it seems the entire files are compressed in one go to xz format, how does zipx do that? Unless it first makes a the files to a single archive it won't be able to make it into one xz file I believe. Hence the doubt. – theCrow Jan 11 '17 at 18:49
  • ok, I think I understood now. Same as with Deflate it takes one file at a time and performs xz operations on it. That means there will be multiple xz headers(one for each file), right? – theCrow Jan 12 '17 at 06:56
  • 7z and WinRAR support "solid" archives, which compresses after grouping the files into an archive, allowing the compressor to take advantage of redundancy across files. Just like .tar.xz. I can find no evidence that WinZip's .zipx format supports solid archives. It appears to compress each entry separately, like the .zip format does. – Mark Adler Jan 12 '17 at 10:39
  • I have confirmed that much by checking the headers. Thank you. It seems there are no documentation available regarding zipx format ot regarding the xz compression method it supports. Anyway thank you. Following what u suggested, it looks like what you told. – theCrow Jan 12 '17 at 10:41
  • @SebuElias What tool do you use to create zip with xz compression? – develar Jun 23 '17 at 09:39
  • @develar Latest winzip can create it. – theCrow Jun 25 '17 at 13:57