-
Notifications
You must be signed in to change notification settings - Fork 365
Closed
Description
After the encoder has finished writing data, the data flushed to the cache using Flush and Close functions is different.
Moreover, the data flushed into the cache using Flush function cannot be decoded.
problem reproduce:
var buf bytes.Buffer
encoder, err := zstd.NewWriter(&buf)
require.NoError(t, err)
encoder.Write(rawData)
encoder.Flush()
fmt.Printf("use Flush compressed data len: %d bytes\n", len(buf.Bytes()))
buf.Reset()
encoder.Reset(&buf)
encoder.Write(rawData)
encoder.Close()
fmt.Printf("use Close compressed data len: %d bytes\n", len(buf.Bytes()))Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels