2015.08.19 13:52 "[Tiff] Large files under Windows", by Bob Friesenhahn

2015.08.19 13:52 "[Tiff] Large files under Windows", by Bob Friesenhahn

Yesterday I committed changes to libtiff CVS which should allow better support for large files (> 2GB) under Windows as long as the SDK is recent enough (equivalent to Visual Studio 2005 or later). The changes should allow tif_unix.c and the libtiff tools to support large files by supporting 64-bit offset values, and limiting individual I/O requests to the available range.

Please note that I have not actually tested the large file support. I have only verified compilation and that the libtiff test suite passes under MinGW 32 and 64-bit, 64-bit Cygwin, and 32/64-bit Unix systems.

Part of the change is that tif_unix.c limits read/write to a maximum of 2147483647 bytes by chunking the writes. This allowed it to work with Windows read/write which accept 'unsigned int' as the size, and returns 'int' as the count of the bytes written. Personally I think that 2147483647 bytes is over-generous and that libtiff should be chunking large writes to a far smaller value (e.g. 256k or much less) in order to not overwhelm the CPU caches and I/O subsystem. Please express any opinion/experience you may have.

There might be some rough edges. Please help by testing.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/