jd-boyd / python-lzo

Python bindings for the LZO data compression library
GNU General Public License v2.0
74 stars 41 forks source link

Added support for compression and decompression using all algorithms supported by LZO C library #61

Closed s-borah closed 2 years ago

s-borah commented 2 years ago

Added LZO1, LZO1A, LZO1B, LZO1C, LZO1F, LZO1X, LZO1Y, LZO1Z, LZO2A and LZO1X (default) as optional parameters in compress and decompress functions.

resolves #53 , resolves #24. Was not sure if version should be updated to 1.16 or not, set it up as 1.16 in the pr.

Further Improvements and suggestions are solicited.

Thanks.

jd-boyd commented 2 years ago

Thank you very much for this. I will review it later this week. It would be nice if tests were added for at least a few of the newly support algorithms.

s-borah commented 2 years ago

Added test cases. Also changed the algorithm argument to keyword argument instead of positional in order to maintain backwards compatibility.

Only minor itch is that LZO1 and LZO1A returns invalid header error for empty input and I did not debug why...just avoided them in the test case.

Cheers

jd-boyd commented 2 years ago

Only minor itch is that LZO1 and LZO1A returns invalid header error for empty input and I did not debug why...just avoided them in the test case.

It would be really nice to see that fixed, but it can be a different pull request I guess.

s-borah commented 2 years ago

Thanks for merging the pull request. When do you plan to publish the new versions on PyPi?

jd-boyd commented 2 years ago

When do you plan to publish the new versions on PyPi?

I was hoping to get #60 finished first. That will hopefully resolve the most common issues people have building it on macOS and Windows. It isn't broken on those platforms, but people have trouble with manually supplying the C library dependency.

s-borah commented 2 years ago

I was hoping to get #60 finished first. That will hopefully resolve the most common issues people have building it on macOS and Windows. It isn't broken on those platforms, but people have trouble with manually supplying the C library dependency.

Yeah, that would be great.