|
@@ -3,9 +3,10 @@ package lz4
|
|
|
import (
|
|
import (
|
|
|
"encoding/binary"
|
|
"encoding/binary"
|
|
|
"fmt"
|
|
"fmt"
|
|
|
- "github.com/pierrec/lz4/internal/xxh32"
|
|
|
|
|
"io"
|
|
"io"
|
|
|
"runtime"
|
|
"runtime"
|
|
|
|
|
+
|
|
|
|
|
+ "github.com/pierrec/lz4/internal/xxh32"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
// zResult contains the results of compressing a block.
|
|
// zResult contains the results of compressing a block.
|
|
@@ -370,6 +371,10 @@ func (z *Writer) Reset(w io.Writer) {
|
|
|
z.checksum.Reset()
|
|
z.checksum.Reset()
|
|
|
z.idx = 0
|
|
z.idx = 0
|
|
|
z.err = nil
|
|
z.err = nil
|
|
|
|
|
+ // reset hashtable to ensure deterministic output.
|
|
|
|
|
+ for i := range z.hashtable {
|
|
|
|
|
+ z.hashtable[i] = 0
|
|
|
|
|
+ }
|
|
|
z.WithConcurrency(n)
|
|
z.WithConcurrency(n)
|
|
|
}
|
|
}
|
|
|
|
|
|