-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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/zlib: NewReaderDict does not work as advertised #7935
Labels
Milestone
Comments
My guess is this is a documentation error, as this is the only place ErrDictionary could be returned. From the perspective of a user, I'd also want it to return an error for a wrong dictionary. Dictionary is not a hint but mandatory; one need to give exactly the same dictionary to inflate and deflate, or otherwise zlib will fail to decompress it. |
Thanks. Looking deeper, I think the comment is actually arguably correct. It says "NewReaderDict ignores the dictionary if the compressed data does not refer to it." What it means by that, I think, is that if the FDICT flag is not set (z.scratch[1]&0x20 == 0) the dict argument is correct. |
Labels changed: added documentation. Owner changed to @rsc. Status changed to Accepted. |
CL https://golang.org/cl/147390043 mentions this issue. |
This issue was closed by revision 0239595. Status changed to Fixed. |
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 25, 2018
Fixes golang#7935. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, ruiu https://golang.org/cl/147390043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 26, 2018
Fixes golang#7935. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, ruiu https://golang.org/cl/147390043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 9, 2018
Fixes golang#7935. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, ruiu https://golang.org/cl/147390043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 30, 2018
Fixes golang#7935. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, ruiu https://golang.org/cl/147390043
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: