Return-Path: <tiff-bounces@lists.maptools.org>
Delivered-To: info@awaresystems.be
Received: (qmail 25182 invoked from network); 23 Aug 2008 00:16:38 -0000
Received: from floyd.telenet-ops.be ([195.130.136.4])
          (envelope-sender <tiff-bounces@lists.maptools.org>)
          by angelia.telenet-ops.be (qmail-ldap-1.03) with SMTP
          for <info@awaresystems.be>; 23 Aug 2008 00:16:38 -0000
Received: from waldo.telenet-ops.be (waldo.telenet-ops.be [195.130.136.10])
	by floyd.telenet-ops.be (8.13.1/8.13.1) with ESMTP id m7N0GceJ018965
	for <info@awaresystems.be>; Sat, 23 Aug 2008 02:16:38 +0200
Received: from localhost (localhost.localdomain [127.0.0.1])
	by waldo.telenet-ops.be (Postfix) with SMTP id 67A341C007
	for <info@awaresystems.be>; Sat, 23 Aug 2008 02:16:38 +0200 (CEST)
Received: from penia.telenet-ops.be (penia.telenet-ops.be [195.130.132.39])
	by waldo.telenet-ops.be (Postfix) with ESMTP id 61F631C006
	for <info@awaresystems.be>; Sat, 23 Aug 2008 02:16:38 +0200 (CEST)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153])
	by penia.telenet-ops.be (Postfix) with ESMTP id EBBA333E602
	for <info@awaresystems.be>; Sat, 23 Aug 2008 02:16:37 +0200 (CEST)
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 m7N0CoNM004757;
	Fri, 22 Aug 2008 20:14:23 -0400
Received: from mail.sidefx.com (mail.sidefx.com [38.99.137.163])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m7N0CmIO004753
	for <tiff@lists.maptools.org>; Fri, 22 Aug 2008 20:12:48 -0400
Received: from www.sidefx.com (unknown [149.99.58.193])
	by mail.sidefx.com (Postfix) with ESMTP id 13D125C011;
	Fri, 22 Aug 2008 20:12:47 -0400 (EDT)
Received: from 99.237.126.63 (SquirrelMail authenticated user edward)
	by www.sidefx.com with HTTP; Fri, 22 Aug 2008 20:12:47 -0400 (EDT)
Message-ID: <55766.99.237.126.63.1219450367.squirrel@www.sidefx.com>
In-Reply-To: <48AF1B47.3030105@cerious.com>
References: <20080822085634.GA21294@bitwizard.nl>
	<Pine.SOC.4.64.0808220936280.1110@freddy.simplesystems.org>
	<20080822162748.GB29030@bitwizard.nl>
	<Pine.SOC.4.64.0808221131320.1110@freddy.simplesystems.org>
	<20080822165232.GE29030@bitwizard.nl>
	<Pine.SOC.4.64.0808221249090.1110@freddy.simplesystems.org>
	<48AF1B47.3030105@cerious.com>
Date: Fri, 22 Aug 2008 20:12:47 -0400 (EDT)
Subject: Re: [Tiff] creating sparse files......
From: "Edward Lam" <edward@sidefx.com>
To: tiff@lists.maptools.org
User-Agent: SquirrelMail/1.4.9a
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
Cc: 
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-SpamCatcher-Score: 10 [X]

On Fri, August 22, 2008 16:02, Phillip Crews wrote:
> If this is for Windows, the simplest solution for the OP may be to store

It is common to use tif_unix.c on Windows. For example, I think the only
way to use a 64-bit compiled libtiff on Windows right now is to use
tif_unix.c. Ideally, we can maintain tif_unix.c to work on Windows as
well.

AFAICT on Windows, sparse files are supported on NTFS, but ONLY if you
explicitly mark it as such using DeviceIOControl. So Rogier's changes to
tif_unix.c won't help on Windows even if it was made to compile by
changing the use of ftruncate() to chsize().

IMHO, the right way is to fix hugin to use TIFFClientOpen(). There's no
need to specialize this case. I might even argue that the uncompressed
.tiff case is not as common as one may think.

>   if (mode[0] == 'w' && (mode[1] == 'c' || mode[2] == 'c') ) {

Note that both the c and C flags are already used to control strip
chopping functionality.

Cheers,
-Edward

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