Esri/lerc

lerc v2 pure-python

achapkowski opened this issue · 5 comments

Is there going to be an implementation of a pure-python solution for Lerc v2?

Low level python code can be much slower than low level C++ code. From what I remember, the Lerc v1 pure python decoder was about 30x slower than the current python module that calls into the Lerc dll. Why would you need a pure python implementation? Or is there a problem with the current python module?
Best, Thomas.

@tmaurer3 The issue isn't speed, but it's the fact that some organizations do not allow for 3rd party dlls to be installed. It also removes the head aches of having to compile the code for each operating system and python version.

@achapkowski Well, the only full decoder we have that does not depend on the dll is the JavaScript one. Is that an option for you? There are currently no plans to rewrite it all in python. Not only because of the extra work, and potential new bugs introduced. I expect a pure python decoder to come out very slow and would not recommend going down that route.

JS is not an option, I wanted to include this package inside the Python API to help convert image service images into numpy arrays

Perhaps it is possible to convert the latest JS decoder to Python? Looks like there are some popular packages out there:
https://github.com/PiotrDabkowski/Js2Py
https://github.com/timothycrosley/jiphy
Why not give it a shot? May involve more work than just pushing a button, but probably much better than starting from scratch.