A compression mechanism that always results in a non-uniform distribution of 0-bytes within the output isn't doing the best compression it could.
Well-compressed output, well-encrypted output, and random output should all be indistinguishable.
-
tye
(but my friends call me "Tye")
| [reply] |
You will often need to store some uncompressed information in a compressed file. Information about the compressed data (length, flags, etc.) is usually uncompressed. Integers within the header may contain a 0x00 because of an unused high order byte, and flags often use 0 as the default value. You can usually count on a header being at the beginning of the file, so you will probably find a few 0x00's at the beginning of a compressed file, and because there may be additional headers for additional compressed blocks throughout the file, there will not be a random distribution of 0x00's throughout the file.
| [reply] |
"zip" files fit your description quite nicely (I can't believe that having 20 of the first 29 bytes of a file be zero makes sense when you are trying to compress things -- like I said, they aren't doing the best compression they could).
The "gzip" files I checked had about 2 zero bytes in the first 10 bytes. This is much more reasonable in my book but also fits your description so...
I conceed the point; you are right. (:
-
tye
(but my friends call me "Tye")
| [reply] |