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

Method setDict

zstd/decoder.go:942–957  ·  view source on GitHub ↗
(frame *frameDec)

Source from the content-addressed store, hash-verified

940}
941
942func (d *Decoder) setDict(frame *frameDec) (err error) {
943 dict, ok := d.o.dicts[frame.DictionaryID]
944 if ok {
945 if debugDecoder {
946 println("setting dict", frame.DictionaryID)
947 }
948 frame.history.setDict(dict)
949 } else if frame.DictionaryID != 0 {
950 // A zero or missing dictionary id is ambiguous:
951 // either dictionary zero, or no dictionary. In particular,
952 // zstd --patch-from uses this id for the source file,
953 // so only return an error if the dictionary id is not zero.
954 err = ErrUnknownDictionary
955 }
956 return err
957}

Callers 3

DecodeAllMethod · 0.95
nextBlockSyncMethod · 0.95
startStreamDecoderMethod · 0.95

Calls 1

printlnFunction · 0.85

Tested by

no test coverage detected