Re: Any zip or tgz that decompress to itself ?



Olivier Girant wrote:
Fulcrum 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 !!!

Someone called Caspian Maclean, made such a file a couple of years
ago. Here it is: http://www.maximumcompression.com/selfgz.gz


Thank you very much. Indeed, gzip is just bitstream, so there is no constraint about header and archive file list... I'd be more interessed in a zip or tgz archive, I don't know if this is really feasible...

Anyway, is there any information on how he proceeded to create such a file ? Study of deflate/inflate algorithm ? brute force tries ?
.



Relevant Pages

  • Re: Any zip or tgz that decompress to itself ?
    ... Fulcrum wrote: ... possible to create a zip or tgz file: ... 3/ the decompressed file has the same content as the original archive... ... Indeed, gzip is just bitstream, so there is no constraint about header and archive file list... ...
    (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)