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

Method Decode

zstd/decodeheader.go:97–100  ·  view source on GitHub ↗

Decode the header from the beginning of the stream. This will decode the frame header and the first block header if enough bytes are provided. It is recommended to provide at least HeaderMaxSize bytes. If the frame header cannot be read an error will be returned. If there isn't enough input, io.ErrU

(in []byte)

Source from the content-addressed store, hash-verified

95// If there isn't enough input, io.ErrUnexpectedEOF is returned.
96// The FirstBlock.OK will indicate if enough information was available to decode the first block header.
97func (h *Header) Decode(in []byte) error {
98 _, err := h.DecodeAndStrip(in)
99 return err
100}
101
102// DecodeAndStrip will decode the header from the beginning of the stream
103// and on success return the remaining bytes.

Callers 2

TestHeader_DecodeFunction · 0.95
ConvertMethod · 0.45

Calls 1

DecodeAndStripMethod · 0.95

Tested by 1

TestHeader_DecodeFunction · 0.76