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

Method initNewEncode

zstd/blockenc.go:77–82  ·  view source on GitHub ↗

initNewEncode can be used to reset offsets and encoders to the initial state.

()

Source from the content-addressed store, hash-verified

75
76// initNewEncode can be used to reset offsets and encoders to the initial state.
77func (b *blockEnc) initNewEncode() {
78 b.recentOffsets = [3]uint32{1, 4, 8}
79 b.litEnc.Reuse = huff0.ReusePolicyNone
80 b.coders.setPrev(nil, nil, nil)
81 b.dictLitEnc = nil
82}
83
84// reset will reset the block for a new encode, but in the same stream,
85// meaning that state will be carried over, but the block content is reset.

Callers 4

ResetMethod · 0.80
resetBasePrefixMethod · 0.80
resetBaseMethod · 0.80
ConvertMethod · 0.80

Calls 1

setPrevMethod · 0.80

Tested by

no test coverage detected