<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 10/1/2014 12:02 PM, Jukka Rahkonen
wrote:<br>
</div>
<blockquote cite="mid:loom.20141001T194923-56@post.gmane.org"
type="cite">
<pre wrap="">For comparison:
Tiff as zipped 347 MB
Tiff into png 263 MB
If I have understood right both zip and png are using deflate algorithm so
there might be some place for improving deflate compression in GDAL.
</pre>
</blockquote>
I was curious how png could achieve such better compression if it
is using the same deflate algorithm. I wouldn't think different
implementations would account for so much improvement. It turns out
the png compression uses a "filtering" step ahead of compression.
This is explained <a
href="http://en.wikipedia.org/wiki/Portable_Network_Graphics#Filtering">here.</a>
The filter is similar to a differential pulse code modulation, in
which the pixel is represented as the difference from the pixels to
the left, left upper diagonal, and above. This typically reduces the
magnitude of the value to something close to zero, making the
encoding more efficient.<br>
<br>
David<br>
</body>
</html>