MCPcopy
hub / github.com/klauspost/compress / ResetContentSize

Method ResetContentSize

zstd/encoder.go:191–196  ·  view source on GitHub ↗

ResetContentSize will reset and set a content size for the next stream. If the bytes written does not match the size given an error will be returned when calling Close(). This is removed when Reset is called. Sizes <= 0 results in no content size set.

(w io.Writer, size int64)

Source from the content-addressed store, hash-verified

189// This is removed when Reset is called.
190// Sizes <= 0 results in no content size set.
191func (e *Encoder) ResetContentSize(w io.Writer, size int64) {
192 e.Reset(w)
193 if size >= 0 {
194 e.state.frameContentSize = size
195 }
196}
197
198// Write data to the encoder.
199// Input data will be buffered and as the buffer fills up

Callers 5

TestEncoder_SmallDictFunction · 0.80
TestEncoderRegressionFunction · 0.80
TestWithEncoderPaddingFunction · 0.80

Calls 1

ResetMethod · 0.95

Tested by 5

TestEncoder_SmallDictFunction · 0.64
TestEncoderRegressionFunction · 0.64
TestWithEncoderPaddingFunction · 0.64