Quote:
Originally Posted by mrmikel
But it means that it has to be unzipped before you can find that. It could take a while to unzip the files in a directory before displaying them.
Seems they decided on the simple and direct approach.
|
Not true. The mime file is intentionally not compressed so that the zip file does not need to be unzipped. Why else would they insist that it be uncompressed. It does have to be opened but not unzipped. It is certainly still a bit faster to look at the extension but Unix does not use extensions preferring the less vulnerable approach. od -c will produce:
0000000 P K 003 004 \n \0 \0 \0 \0 \0 C y 242 B o a
0000020 253 , 024 \0 \0 \0 024 \0 \0 \0 \b \0 \0 \0 m i
0000040 m e t y p e a p p l i c a t i o
0000060 n / e p u b + z i p P K 003 004 024 \0
0000100 002 \0 \b \0 D y 242 B 9 357 > 005 274 \0 \0 \0
where PK 003 004 shows it is a zip archive and the mime type will always start at the offset 2E
Dale