On Wed, 28 Nov 2018 10:43:04 -0800 "Gregory P. Smith" firstname.lastname@example.org wrote:
On Wed, Nov 28, 2018 at 9:52 AM Brett Cannon email@example.com wrote:
Are we getting to the point that we want a compresslib like hashlib if we are going to be adding more compression algorithms?
Lets avoid the lib suffix when unnecessary. I used the name hashlib because the name hash was already taken by a builtin that people normally shouldn't be using. zlib gets a lib suffix because a one letter name is evil and it matches the project name. ;) "compress" sounds nicer.
... looking on PyPI to see if that name is taken: https://pypi.org/project/compress/ exists and is already effectively what you are describing. (never used it or seen it used, no idea about quality)
I don't think adding lz4 to the stdlib is worthwhile. It isn't required for core functionality as zlib is (lowest common denominator zip support).
Actually, if some people are interested in compressing .pyc files, lz4 is probably the best candidate (will yield significant compression benefits with very little CPU overhead).