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

compress/flate: cleanup huffman_bit_writer.go #18458

Closed
dsnet opened this issue Dec 29, 2016 · 5 comments
Closed

compress/flate: cleanup huffman_bit_writer.go #18458

dsnet opened this issue Dec 29, 2016 · 5 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dsnet
Copy link
Member

dsnet commented Dec 29, 2016

The huffman_bit_writer.go file contains references to some "extended window" implementation, which seems to provide the ability to reference a distance greater than 15 bits (up to 22 bits it seems). This goes contrary to RFC 1951, which distinctly says the maximum distance is 32768. As far as I can tell, this behavior is disabled since logWindowSize = 15, which ensures that we will never use a distance greater than this. Even if it were somehow usable, we should fix this since that means we could accidentally produce non-RFC1951 compliant files.

This logic has been included since 2009, so I am unsure as to what the original purpose of this is. Can we delete these?

\cc @nigeltao @krasin2

@dsnet dsnet added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Dec 29, 2016
@dsnet dsnet added this to the Go1.9Maybe milestone Dec 29, 2016
@dsnet dsnet self-assigned this Dec 29, 2016
@krasin
Copy link

krasin commented Dec 29, 2016

More active members of the Go team might correct me, but my guess is it's okay to remove. Note: I have not touched the Go stdlib for years.

@minux
Copy link
Member

minux commented Dec 29, 2016 via email

@dsnet dsnet added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Jan 2, 2017
@dsnet
Copy link
Member Author

dsnet commented Jan 2, 2017

@minux, that would be a very useful feature, but I agree with the hard parts that you pointed out. Want to file separate issue for that?

@nigeltao
Copy link
Contributor

nigeltao commented Jan 5, 2017

Deleting LGTM.

@bradfitz bradfitz modified the milestones: Go1.10, Go1.9Maybe May 24, 2017
@gopherbot
Copy link

Change https://golang.org/cl/60490 mentions this issue: compress/flate: remove non-standard extensions to flate

@golang golang locked and limited conversation to collaborators Aug 31, 2018
@rsc rsc unassigned dsnet Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants