Closed haasad closed 6 years ago
I have also been looking at this, and have played around a bit with libarchive, but without any progress. Unfortunately, 7zip seems to compress ecoinvent particularly well - I tried different compression levels with zip, bz2, and gz. I don't have the exact numbers, but think that 7zip for 3.4 cutoff is around 70 MB, and the best alternative, bz2 was around 110 MB. Still might be worth asking if ecoinvent would post .tar.bz2
, this would allow the use of the standard lib.
Maybe you already do this, but I would save the compressed archive in a system directory (using appdirs
) to avoid downloading more than once.
I created https://github.com/haasad/eidl7zip to solve this issue. I provides a command-line version of the 7zip program for all three OSs. I'll make a PR for bw2io
when I find the time, @cmutel.
Currently a manual installation of
7zip
is required to useeidl
. It would be way more convenient to have an 7z-capable unarchive program installed via conda. This would also make it possible to includeeidl
as a dependency tobw2io
to useeidl
directly viabrightway
.Options:
libarchive
is available for all three major OS on the official anaconda channel (windows was missing before)libarchive
that I could get to work is python-libarchive-clibarchive-c
works fine on linux, but fails to extract a 7z archive on windows, I get the error message described hereping @cmutel, picking up from our email conversation from some weeks ago