Re: Any zip or tgz that decompress to itself ?



Hans-Peter Diettrich wrote:
Olivier Girant wrote:

May be this has already been discussed before, i'm wondering if it is possible to create a zip or tgz file:
1/ if zip, contains a zip file
2/ if tgz, contains a tgz file
3/ the decompressed file has the same content as the original archive...

If such a file has been found, i'd be really interessed !!!

A chicken and egg problem ;-)

Since compressed files do not compress very well, I'd assume that a zipped zip will become longer, due to the added header etc. information. Most compressors refuse to compress an uncompressable file again, and instead switch to store mode, what obviously must result in a bigger output file.

DoDi

I don't agree with you. The zip header format is compressed and is not random data at all. One can take advantage of the potentially compressible header to have a zip file with the same size. It implies that the "incompressible" part size is not too high. I think that the difficulty is not to file size, but make the file respects the zip format with header and file list...

Olivier
.



Relevant Pages

  • Re: Any zip or tgz that decompress to itself ?
    ... possible to create a zip or tgz file: ... Since compressed files do not compress very well, I'd assume that a zipped zip will become longer, due to the added header etc. information. ... Most compressors refuse to compress an uncompressable file again, and instead switch to store mode, what obviously must result in a bigger output file. ... The zip header format is not compressed and is not random data at all. ...
    (comp.compression)
  • Re: Any zip or tgz that decompress to itself ?
    ... Olivier Girant wrote: ... possible to create a zip or tgz file: ... Most compressors refuse to compress an uncompressable file again, and instead switch to store mode, what obviously must result in a bigger output file. ...
    (comp.compression)
  • Re: Reading compressed files
    ... (especially unix compress). ... HEADER BODY and FOOTER by open function. ... What you need to do is research each syntax and ...
    (comp.lang.python)
  • Re: Converting Compressed RISCOS ROM Images to Readable Format
    ... are supplied in compressed form into normal readable format. ... appear compressed with header word "SQSH". ... to "Squash" and unsquashing them gives the error "Invalid Squash ... ancient UNIX tool 'compress', which is 20 bit LZW, except for the ...
    (comp.sys.acorn.apps)
  • Re: http/1.1 decompress
    ... I should be able to remove the content-encoding field from the header ... the request is send to the server => the server won't compress the ... so just make sure you don't set the header in your code explicitly. ...
    (microsoft.public.dotnet.languages.csharp)