Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: compress/lzw: freeze lzw package #25429

Closed
dsnet opened this issue May 16, 2018 · 4 comments
Closed

proposal: compress/lzw: freeze lzw package #25429

dsnet opened this issue May 16, 2018 · 4 comments

Comments

@dsnet
Copy link
Member

dsnet commented May 16, 2018

In the spirit of #15557, I propose freezing the compress/lzw package such that we no longer accept new features or optimizations. Only bug fixes would be accepted.

My rationale for freezing is:

  • It was originally added to support image/gif and is primarily used in the GIF, PDF, and TIFF formats and probably should have been an internal package.
  • To my knowledge, it does not have a standardized specification. Thus, the exact format actually slightly differs even between GIF and TIFF (see Proposal: compress/lzw: extend package for correctly handling tiff files and pdf LZWDecode filters  #25409).
  • It is very seldom used (100x fewer than gzip):
    • compress/lzw: 78 imports
    • compress/bzip2: 845 imports
    • compress/flate: 1338 imports
    • compress/gzip: 10327 imports
  • The package is difficult to use as the exact options used when writing are important for how to semantically interpret the format when reading.

Those who desire new features are welcome to fork the package and make modifications as fit.

@ghost
Copy link

ghost commented May 17, 2018

Why disallow optimizations though? The rationale evades this point.

@dsnet
Copy link
Member Author

dsnet commented May 17, 2018

My motivation for disallowing optimizations is that experience shows that optimizations have an unfortunate side-effect of often introducing bugs. Additionally, optimizations generally increase the complexity of a package, not decrease it.

@hhrutter
Copy link

As noted in #25409 compress/lzw does not work correctly with PDFs.

@rsc
Copy link
Contributor

rsc commented May 21, 2018

Dup of #25409. Completely different suggestion but clearly just the other side of the coin. Resolving #25409 will resolve this, one way or another. No need to keep both open.

@rsc rsc closed this as completed May 21, 2018
@golang golang locked and limited conversation to collaborators May 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants