From 4c6da3917428bcd18ec7fbd09b84390d3131a4b6 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Fri, 18 Dec 2020 00:17:16 -0800 Subject: [PATCH] zstd: Always reset literal dict encoder (#303) Currently the literal encoder can be carried over. Not currently needed, but could give unexpected results in the future. --- zstd/blockenc.go | 1 + 1 file changed, 1 insertion(+) diff --git a/zstd/blockenc.go b/zstd/blockenc.go index 083fbb502f..c85c40255d 100644 --- a/zstd/blockenc.go +++ b/zstd/blockenc.go @@ -76,6 +76,7 @@ func (b *blockEnc) reset(prev *blockEnc) { if prev != nil { b.recentOffsets = prev.prevRecentOffsets } + b.dictLitEnc = nil } // reset will reset the block for a new encode, but in the same stream,