Hi,
We've encountered an issue while reading GeoTIFF files generated by SNAP.
The files use LZW compression, but geotiff fails to decompress them, while other software (e.g. SNAP and GDAL) can read them without any issues.
After debugging, it appears the problem may be related to the LZW dictionary buffer size. From investigation:
- The GeoTIFFs written by SNAP seem to require a dictionary size of 4096 entries.
- The current implementation in geotiff appears to be limited to 4093 entries (or otherwise stops growing the dictionary before reaching 4096).
- This causes decompression to fail for these files.
Questions:
- Is the current dictionary size intentionally limited to 4093?
- Is there a reason it doesn't allow the full 4096 entries defined by the LZW specification?
- Could this be the cause of the incompatibility with GeoTIFFs produced by SNAP?
- If this is a bug, would you be open to a fix?
Thanks.
Hi,
We've encountered an issue while reading GeoTIFF files generated by SNAP.
The files use LZW compression, but geotiff fails to decompress them, while other software (e.g. SNAP and GDAL) can read them without any issues.
After debugging, it appears the problem may be related to the LZW dictionary buffer size. From investigation:
Questions:
Thanks.