Karl (supersat) wrote in supersat_tech,
Karl
supersat
supersat_tech

New Userpic | Gratuitous Icon Post

I think my new userpic is rather self-explanatory. For those of you living in a cave or outside the US, the DMCA is a federal law that makes circumventing copy protection schemes, and devices that do so, illegal, among other things. Of course, the law tramples fair-use rights and has been greatly abused.

This isn't an ordinary userpic, though. Save the userpic to your hard drive, change the extension to .zip, and see what happens when you open it. I won't ruin the surprise, so the explanation of why it works is below the lj-cut.


The ZIP file "header" (the central directory) is placed at the very end of the file, and uses relative offsets to point to the locations of the individual files. Therefore, it's possible for ZIP files to have "junk data" at the beginning of the file without affecting anything.

The PNG standard has a special data chunk type (IEND) that specifies the end of the PNG data. Therefore, it's possible to have "junk data" at the end of the PNG file without affecting decoding.

Since the ZIP standard allows junk at the beginning, and the PNG standard allows junk at the end, it's possible to create a file that's both a ZIP and PNG file.
  • Post a new comment

    Error

    default userpic
  • 5 comments