Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDAL /vsizip fails to open ZIP archive which is compressed with Deflate64 #7013

Closed
neteler opened this issue Jan 3, 2023 · 3 comments
Closed
Assignees

Comments

@neteler
Copy link
Member

neteler commented Jan 3, 2023

Trying to read open data provided by the City of Hamburg in Germany leads to an issue with unsupported Deflate64 compression:

gdalinfo /vsizip/vsicurl/https://daten-hamburg.de/geographie_geologie_geobasisdaten/digitales_hoehenmodell_bdom/DOM1_XYZ_HH_2020_04_30.zip/dom1_32_555_5928_1_hh.xyz
ERROR 6: A file in the ZIP archive uses the Deflate64 unsupported compression method. You can uncompress priorly with the unzip utility.
ERROR 1: cpl_unzOpenCurrentFile() failed
gdalinfo failed - unable to open '/vsizip/vsicurl/https://daten-hamburg.de/geographie_geologie_geobasisdaten/digitales_hoehenmodell_bdom/DOM1_XYZ_HH_2020_04_30.zip/dom1_32_555_5928_1_hh.xyz'.

The related code section is here:

"A file in the ZIP archive uses the Deflate64 unsupported "

I cannot judge how much effort it would be to implement support for the Deflate64 compression (for now we can go on with download/uncompress, then continue with GDAL) but I took liberty to open an issue.

@rouault
Copy link
Member

rouault commented Jan 3, 2023

how much effort it would be to implement support for the Deflate64 compression

A non-trivial one, given that Deflate64 is not supported by zlib itself: https://en.wikipedia.org/wiki/Deflate#Deflate64/Enhanced_Deflate. That said it seems that the code at https://github.com/madler/zlib/tree/master/contrib/infback9 could be used, seeing it mentioned at https://pypi.org/project/zipfile-deflate64/

@rouault rouault self-assigned this Jan 3, 2023
rouault added a commit to rouault/gdal that referenced this issue Jan 3, 2023
rouault added a commit to rouault/gdal that referenced this issue Jan 3, 2023
rouault added a commit to rouault/gdal that referenced this issue Jan 3, 2023
@rouault
Copy link
Member

rouault commented Jan 3, 2023

Implemented in #7014. Was quite tricky as infback9 needs to be patched to be usable for streamed reading.

rouault added a commit to rouault/gdal that referenced this issue Jan 3, 2023
@neteler
Copy link
Member Author

neteler commented Jan 4, 2023

Wow, thanks for your efforts, @rouault!

@rouault rouault closed this as completed in d6baebc Jan 4, 2023
rouault added a commit that referenced this issue Jan 4, 2023
/vsizip/: add read support for Deflate64 (fixes #7013)
a0x8o added a commit to a0x8o/gdal that referenced this issue Jan 4, 2023
/vsizip/: add read support for Deflate64 (fixes OSGeo#7013)
a0x8o added a commit to a0x8o/gdal that referenced this issue Jan 5, 2023
/vsizip/: add read support for Deflate64 (fixes OSGeo#7013)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants