pierrec / lz4

LZ4 compression and decompression in pure Go
BSD 3-Clause "New" or "Revised" License
878 stars 142 forks source link

internal/lz4block: Handle empty buffer in amd64 decoder #164

Closed greatroar closed 2 years ago

greatroar commented 2 years ago

Fixes #163. The test for this is currently to run

go test ./internal/lz4block -run=TestBlockDecode/empty_input -v

and check that no -2 occurs in the output. I can add a separate test, but if #160 is resolved by allowing some not-quite-valid inputs (#165), that's not necessary.