diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2020-02-19 09:17:16 +0000 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-02-19 11:40:53 +0100 |
commit | 86be569961b6dc73d15cbf9e709a12e586ba0077 (patch) | |
tree | 33d9183dd0af415168633aabee8c85d7000af744 /vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go | |
parent | 1bed53b02c2f65ba26dc320a797c6fe473fce9a1 (diff) | |
download | podman-86be569961b6dc73d15cbf9e709a12e586ba0077.tar.gz podman-86be569961b6dc73d15cbf9e709a12e586ba0077.tar.bz2 podman-86be569961b6dc73d15cbf9e709a12e586ba0077.zip |
build(deps): bump github.com/containers/storage from 1.15.8 to 1.16.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.15.8 to 1.16.0.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.15.8...v1.16.0)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go')
-rw-r--r-- | vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go b/vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go index 9feea87a3..56ee6dc8b 100644 --- a/vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go +++ b/vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go @@ -177,6 +177,11 @@ func (w *huffmanBitWriter) flush() { w.nbits = 0 return } + if w.lastHeader > 0 { + // We owe an EOB + w.writeCode(w.literalEncoding.codes[endBlockMarker]) + w.lastHeader = 0 + } n := w.nbytes for w.nbits != 0 { w.bytes[n] = byte(w.bits) @@ -594,8 +599,8 @@ func (w *huffmanBitWriter) writeBlockDynamic(tokens *tokens, eof bool, input []b tokens.AddEOB() } - // We cannot reuse pure huffman table. - if w.lastHuffMan && w.lastHeader > 0 { + // We cannot reuse pure huffman table, and must mark as EOF. + if (w.lastHuffMan || eof) && w.lastHeader > 0 { // We will not try to reuse. w.writeCode(w.literalEncoding.codes[endBlockMarker]) w.lastHeader = 0 |