saulpw/unzip-http

Exception: unknown compression method 9

mccarthyryanc opened this issue · 2 comments

Here is the command I'm trying to run:

unzip-http https://fbinter.stadt-berlin.de/lidar/Nordost.zip 3dm_33_400_5834_1_be.las > 3dm_33_400_5834_1_be.las

Which gives the following error:

Traceback (most recent call last):
  File "/home/rcm/miniconda3/envs/test/bin/unzip-http", line 62, in <module>
    main(*args)
  File "/home/rcm/miniconda3/envs/test/bin/unzip-http", line 53, in main
    fp = StreamProgress(rzf.open(f), name=f.filename, total=f.compress_size)
                        ^^^^^^^^^^^
  File "/home/rcm/miniconda3/envs/test/lib/python3.11/site-packages/unzip_http.py", line 209, in open
    error(f'unknown compression method {method}')
  File "/home/rcm/miniconda3/envs/test/lib/python3.11/site-packages/unzip_http.py", line 35, in error
    raise Exception(s)
Exception: unknown compression method 9

For some more details, I downloaded the zip and ran unzip -v for the following table:

Archive:  Nordost.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
502777261  Def64N 214255624  57% 2021-06-23 14:26 bb038a23  3dm_33_400_5826_1_be.las
419140249  Def64N 177376842  58% 2021-06-23 14:34 3ac4c66a  3dm_33_400_5827_1_be.las
62535253  Def64N 27337765  56% 2021-06-23 14:36 cf17bfe5  3dm_33_400_5828_1_be.las
30990427  Def64N 14001832  55% 2021-06-23 15:00 b060d518  3dm_33_400_5832_1_be.las
145758559  Def64N 66743943  54% 2021-06-23 15:04 749f0c26  3dm_33_400_5833_1_be.las
 7890037  Def64N  3611646  54% 2021-06-23 15:05 fef2b2ad  3dm_33_400_5834_1_be.las
463060459  Def64N 180252954  61% 2021-06-24 06:16 fdd24b11  3dm_33_401_5826_1_be.las
272314671  Def64N 104362563  62% 2021-06-24 06:09 e8303ed7  3dm_33_401_5827_1_be.las
412374691  Def64N 169386853  59% 2021-06-28 15:04 f89d361c  3dm_33_402_5826_1_be.las
40576687  Def64N 15047392  63% 2021-06-28 15:05 a28d963b  3dm_33_402_5827_1_be.las
23602277  Def64N 10555268  55% 2021-06-29 07:13 b0ca03d9  3dm_33_403_5826_1_be.las
--------          -------  ---                            -------
2381020571         982932682  59%                            11 files

This is apparently the proprietary DEFLATE64 compression method. See comments here, for another open source library that had the same request: thejoshwolfe/yauzl#58

Unfortunately I don't think there's a neat way to get this working with unzip-http. Can you get the publisher of the above .zip to compress it differently?

Thanks for the response! I didn't know DEFLATE64 was proprietary, totally understand the headache of supporting something like that here.