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

huff0: Do not check max size when reading table. #586

Merged
merged 1 commit into from
May 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
huff0: Do not check max size when reading table.
This is only really needed when compressing anyway.

Fixes #585
  • Loading branch information
klauspost committed May 11, 2022
commit 9e590f5cd0f7bb12bf621c273b7bb728347d2610
2 changes: 1 addition & 1 deletion huff0/decompress.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const use8BitTables = true
// If no Scratch is provided a new one is allocated.
// The returned Scratch can be used for encoding or decoding input using this table.
func ReadTable(in []byte, s *Scratch) (s2 *Scratch, remain []byte, err error) {
s, err = s.prepare(in)
s, err = s.prepare(nil)
if err != nil {
return s, nil, err
}
Expand Down