Received: from mailgate001.isp.belgacom.be (mailgate001.isp.belgacom.be [195.238.6.86])
	by maildelivery017.isp.belgacom.be (Postfix) with ESMTP id 56D11C082
	for <joris.at.lebbeke@skynet.be>; Thu,  5 Jul 2007 17:34:28 +0200 (CEST)
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 05 Jul 2007 17:34:24 +0200
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l65F8vm2011221;
	Thu, 5 Jul 2007 11:09:17 -0400
Received: from dns2.namehog.net (dns2.namehog.net [213.52.234.203])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l65F8p1w011218
	for <tiff@lists.maptools.org>; Thu, 5 Jul 2007 11:08:51 -0400
Received: from 81-86-57-99.dsl.pipex.com ([81.86.57.99] helo=EKAT)
	by dns2.namehog.net with esmtpa (Exim 4.66)
	(envelope-from <andy.cave@hamillroad.com>)
	id 1I6Sx6-0001jB-MX; Thu, 05 Jul 2007 16:09:04 +0100
Message-ID: <02f301c7bf16$643e03c0$da60fea9@EKAT>
From: "Andy Cave" <andy.cave@hamillroad.com>
To: "Andrey Kiselev" <dron@ak4719.spb.edu>, <tiff@lists.maptools.org>
References: <20070705105619.GA13773@ak4719.spb.edu><01f201c7befc$746a2d60$da60fea9@EKAT>
	<20070705125702.GA15896@ak4719.spb.edu>
Subject: Re: [Tiff] 16-Bit-Per-Channel Lossless Compression
Date: Thu, 5 Jul 2007 16:08:47 +0100
Organization: Hamillroad Software
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
	reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-PopBeforeSMTPSenders: acave@hamillroad.com, news@hamillroad.com,
	sales@hamillroad.com, support@hamillroad.com
X-AntiAbuse: This header was added to track abuse,
	please include it with any abuse report
X-AntiAbuse: Primary Hostname - dns2.namehog.net
X-AntiAbuse: Original Domain - lists.maptools.org
X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12]
X-AntiAbuse: Sender Address Domain - hamillroad.com
X-Source: 
X-Source-Args: 
X-Source-Dir: 
Cc: 
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
Reply-To: Andy Cave <andy.cave@hamillroad.com>
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.0000255e
X-MSP-STORE: Thu, 05 Jul 2007 17:34:28 +0200
Status:   

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 ----- 
From: "Andrey Kiselev" <dron@ak4719.spb.edu>
To: <tiff@lists.maptools.org>
Sent: Thursday, July 05, 2007 1:57 PM
Subject: Re: [Tiff] 16-Bit-Per-Channel Lossless Compression


> 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
>
> Best regards,
> Andrey
>
> -- 
> Andrey V. Kiselev
> ICQ# 26871517
> _______________________________________________
> Tiff mailing list: Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/ 


_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
