2007.07.03 18:37 "[Tiff] BigTIFF extension?", by Phil Harvey

2007.07.05 15:08 "Re: [Tiff] 16-Bit-Per-Channel Lossless Compression", by Andy Cave

Actually, I used quite small tiles - not something I normally do. For 1 bit data, larger tiles are better (but then there's more repeatability). In this case I used tiles approx 40x128 and lzw'd it as a stream. Unless I made a mistake, it compresses to around 20M or thereabouts. That was RGB interleaved 16 bit data - no messing about splitting it or anything.

I found that each tile compressed by around 50%+. I presume that was because the LZW code uses 9 or 10 bits for more data and also finds more repeated strings.

Can you repeat your below test with BLOCKXSIZE=40 and BLOCKYSIZE=128?

Best Regards,

Andy.

----- Original Message -----

On Thu, Jul 05, 2007 at 01:03:07PM +0100, Andy Cave wrote:

I can easily do much better than that - 60:48. I can get ~21276876 (~20M) and with some more work I think I can get down to 15-20M.

Really? But how?

Andrey - since you have tiffcp built, can you repeat your test, but produce tiled output? LZW and Flate. I think you'll find you get what

Actually I did that --- without much success, so I have not listed these

results. The full results:

        Original                                60483984
        ZIP, predictor 2                        48095962
        ZIP, predictor 2, separated             49303374
        ZIP, predictor 2, tiled                 47528554
        ZIP, predictor 2, tiled, separated      49347802

So we can get better results with tiling, but nothing serious. Band

separation doesn't help at all (though, I also thought that it should

help). Those, who want reproduce this tests should get the GDAL library

and use tool called gdal_translate, because tiffcp does not support band

separation for 16-bit images. The command line to get tiled separated

image is:

 $ gdal_translate -co "COMPRESS=ZIP" -co "PREDICTOR=2" -co "TILED=YES" -co "BLOCKXSIZE=256" -co "INTERLEAVE=BAND" IMG_2948.Flowers1.tif IMG_2948.Flowers1-zip2-tiled-sep.tif