AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2008.08.19 05:17 "[Tiff] Regarding DICONDE and its Specification", by Harsha
2008.08.19 16:05 "Re: [Tiff] Regarding DICONDE and its Specification", by Bob Friesenhahn
2008.08.20 12:37 "Re: [Tiff] Regarding DICONDE and its Specification", by Harsha
2008.08.20 15:12 "Re: [Tiff] Regarding DICONDE and its Specification", by Bob Friesenhahn
2008.08.20 14:03 "Re: [Tiff] Regarding DICONDE and its Specification", by Gene Amtower
2008.08.22 15:21 "Re: [Tiff] creating sparse files......", by Toby Thain
2008.08.22 08:56 "[Tiff] creating sparse files......", by Rogier Wolff
2008.08.22 13:11 "Re: [Tiff] creating sparse files......", by Toby Thain
2008.08.22 15:45 "Re: [Tiff] creating sparse files......", by Rogier Wolff
2008.08.22 16:26 "Re: [Tiff] creating sparse files......", by Toby Thain
2008.08.22 14:44 "Re: [Tiff] creating sparse files......", by Bob Friesenhahn
2008.08.22 16:27 "Re: [Tiff] creating sparse files......", by Rogier Wolff
2008.08.22 16:40 "Re: [Tiff] creating sparse files......", by Bob Friesenhahn
2008.08.22 16:52 "Re: [Tiff] creating sparse files......", by Rogier Wolff
2008.08.22 18:11 "Re: [Tiff] creating sparse files......", by Bob Friesenhahn
2008.08.22 20:02 "Re: [Tiff] creating sparse files......", by Phillip Crews
2008.08.23 00:12 "Re: [Tiff] creating sparse files......", by Edward Lam
2008.08.23 15:26 "Re: [Tiff] creating sparse files......", by Rogier Wolff
2008.08.23 16:07 "Re: [Tiff] creating sparse files......", by Bob Friesenhahn
2008.08.23 16:23 "Re: [Tiff] creating sparse files......", by Rogier Wolff
2008.08.23 16:46 "Re: [Tiff] creating sparse files......", by Bob Friesenhahn
2008.08.23 15:08 "Re: [Tiff] creating sparse files......", by Rogier Wolff
2008.08.23 15:54 "Re: [Tiff] creating sparse files......", by Bob Friesenhahn
2008.08.23 15:58 "Re: [Tiff] creating sparse files......", by Rogier Wolff
2008.08.23 16:02 "Re: [Tiff] creating sparse files......", by Rogier Wolff
2008.08.23 16:51 "Re: [Tiff] creating sparse files......", by Gene Amtower
2008.08.23 17:39 "Re: [Tiff] creating sparse files......", by Rogier Wolff
2008.08.25 06:28 "Re: [Tiff] creating sparse files......", by Andrey Kiselev
2008.08.25 09:37 "Re: [Tiff] creating sparse files......", by John
2008.08.25 10:41 "RE: [Tiff] creating sparse files......", by Tillaart, Rob van den
2008.08.25 12:15 "Re: [Tiff] creating sparse files......", by John
2008.08.26 13:14 "Re: [Tiff] creating sparse files......", by Edward Lam
2008.08.23 18:49 "Re: [Tiff] creating sparse files......", by Rogier Wolff
2008.08.23 18:03 "Re: [Tiff] creating sparse files......", by Toby Thain

2008.08.25 06:28 "Re: [Tiff] creating sparse files......", by Andrey Kiselev

Roger,

My primary concern about this issue is a portability. I am not sure this approach is totally portable even across the POSIX-compatible systems (and there are multiple levels of compatibility, that is what is the certification for). Also I think the compression will better results overall. Fast methods, such as LZW and Packbits should be great for this particular purpose.

Despite of that it is possible to add such a functionality to libtiff. It can be user-controlled using the TIFFOpen() parameter, just like we are controlling memory-mapped files usage. If not enabled this code path should not be used at all. On some systems it should be disabled during the compile time, just like it is for memory-mapping. Our documentation states:

M      Enable the use of memory-mapped files for  images  opened  read-

       only.   If  the underlying system does not support memory-mapped

       files or if the specific image being opened cannot be memory-
       mapped then the library will fallback to using the normal system
       interface for reading information. By default the library will
       attempt to use memory-mapped files.

We can use the same approach with the sparse files, though it should be disabled by default.

Roger, if you like to see this in libtiff, please, prepare the patch and submit it via our Bugzilla. But I would like to see it tested under various conditions, the FAT and network file systems are mandatory, I see there is a small likelihood of accidental data loss.

The flag 's' ('sparse') seems to be free for usage in TIFFOpen().

Best regards,

Andrey

--
Andrey V. Kiselev
ICQ# 26871517