Originally posted by hamsi Entropy, c.r.brown, thank you for your quick responses.
when I unzip the compressed files by "winzip" or "winrar" they are same size again, not smaller. So I expect to get same size DNGs after converting from PEF. (I think "the size of in camera DNGs" should be equal to "the size of DNGs converted from PEF" since they are both the same format). That's why I'm surprised...
I assume that PEF is a lossless compression; while DNGs converted from PEF and in camera DNGs are both uncompressed.
I think if PEF were a lossless compression, DNG's converted from PEF wouldn't be smaller than in-camera DNG's. Where am I wrong?
I wonder if there is a test can prove that "PEF" and "DNGs converted from PEF" are both lossless as "in-camera DNGs"?
...seeing is believing...
Not all compression algorithms are created equally. Algorithms like ZIP, RAR, 7zip, bzip2, and RAR are intended to be "generic" algorithms that try to perform as best as they can in all situations. Even within these "generic" algorithms there is variation in performance. 7zip blows away gzip and the original LZH-based ZIP algorithm in almost all situations, and is somewhat better than bzip2 (which also beats all of the others in nearly all situations), but takes far more CPU time and memory to compress and decompress.
Given specific types of input data (such as audio or an image) it is possible to develop special algorithms that maximize efficiency for that type of input data while sacrificing efficiency on other types. For example, image data is two dimensional, so given knowledge of that it is possible to optimize the compression scheme given that knowledge compared to a "one dimensional" algorithm like ZIP, gzip, or bzip2.
For example, I believe the JPEG algorithm consists primarily of three parts:
Discrete Cosine Transform (converts space/time-domain information into frequency-domain information - lossless) - This is basically a step that converts the data into something "easier" to compress
Quantization of the frequency domain information (lossy)
Huffman encoding of the resulting information (lossless)
There is support for lossless JPEG compression, although most encoders (and many decoders) don't implement it. It basically uses the two lossless steps from above.