Received: from mailgate004.isp.belgacom.be (mailgate004.isp.belgacom.be [195.238.6.89])
	by maildelivery015.isp.belgacom.be (Postfix) with ESMTP id A9A224F809A
	for <joris.at.lebbeke@skynet.be>; Tue, 23 Oct 2007 10:25:54 +0200 (CEST)
X-Authentication-Results: in.mx.skynet.be header.from=jcupitt@gmail.com; dkim=permfail (body hash did not verify [TEST])
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 23 Oct 2007 10:25:53 +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 l9N8AcAL016166;
	Tue, 23 Oct 2007 04:10:49 -0400
Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.225])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l9N8ATn2016163
	for <tiff@lists.maptools.org>; Tue, 23 Oct 2007 04:10:31 -0400
Received: by nz-out-0506.google.com with SMTP id z6so662354nzd
	for <tiff@lists.maptools.org>; Tue, 23 Oct 2007 01:10:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta;
	h=domainkey-signature:received:received:message-id:date:from:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
	bh=fxFOpDOpJ2xT5wrFyLMOAYGK6W86ThwHIPM6c/ZJng0=;
	b=CFTW23NhuiROI8dGksnBMVcZjsEav+Y5TO9YTJ5qiabS7y2PUF5Arw0M5e7Ny90xEfrkTgmmSVoB6x8RoImJFK/Ru5h4EodirHgvb24qLA8Dh956JYvemMrCXAaNFp2GyMgI7PxmuH1vdo//I6XC2FdktXQKHFn5knjKbpbxXbo=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta;
	h=received:message-id:date:from:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
	b=YZEkG7laYf+PsXYHjGeyB0sSYkKNGWwEfVLBH5dab1vzFAbG2pMt4E57Hs1pUIbpR2HgXBysgBScFSPCTm7ChXK7GiDgniJQVl28gOmZYGgSrTtuE57DFBRHwwKI3VBm/wJJdbJsN11AFBI285mmJ0AwNnqFJMn1/16IIxGEja4=
Received: by 10.142.80.7 with SMTP id d7mr1696557wfb.1193127025734;
	Tue, 23 Oct 2007 01:10:25 -0700 (PDT)
Received: by 10.142.245.16 with HTTP; Tue, 23 Oct 2007 01:10:25 -0700 (PDT)
Message-ID: <522c6460710230110k252ac6bdqa3adbe3adb951307@mail.gmail.com>
Date: Tue, 23 Oct 2007 09:10:25 +0100
From: jcupitt@gmail.com
Subject: Re: [Tiff] bad version number 10752
Cc: "libtiff - Liste" <tiff@lists.maptools.org>
In-Reply-To: <471DA5A2.8020602@argyllcms.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <Pine.LNX.4.61.0710221935310.7248@sirius.rasena>
	<Pine.SOC.4.64.0710221327490.1894@freddy>
	<Pine.LNX.4.61.0710222045440.7248@sirius.rasena>
	<471D5D73.3010505@argyllcms.com>
	<Pine.LNX.4.61.0710230815300.7209@sirius.rasena>
	<471DA5A2.8020602@argyllcms.com>
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
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.0000287a
X-MSP-STORE: Tue, 23 Oct 2007 10:25:54 +0200
Status: RO

On 10/23/07, Graeme Gill <graeme2@argyllcms.com> wrote:
> Kai-Uwe Behrmann wrote:
> > Reads elegant. What would you suggest?
>
> If you're not familiar with the approach, take a look
> at the source code in icclib.
>
> It's not as "efficient" as some other approaches, but in this age
> of super fast core CPU speed, and relatively slow memory sytems,
> the lack of efficiency is moot. It also avoids issues with
> misaligned words etc., which trouble some architectures.

I do a mix in my library: I do endian-independent read for the header,
then for the data I test endianness at runtime and insert a swap
operation if file endianness does not match CPU endianness.

I suppose it depends on the mix of parsing file structure vs. reading
large amounts of data. If you're parsing, I agree that reading a byte
at a time is fine. If you need to get a large volume of data out of a
file, then I think you need something lower level.

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