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

Method encodeRaw

zstd/blockenc.go:310–320  ·  view source on GitHub ↗

encodeRaw can be used to set the output to a raw representation of supplied bytes.

(a []byte)

Source from the content-addressed store, hash-verified

308
309// encodeRaw can be used to set the output to a raw representation of supplied bytes.
310func (b *blockEnc) encodeRaw(a []byte) {
311 var bh blockHeader
312 bh.setLast(b.last)
313 bh.setSize(uint32(len(a)))
314 bh.setType(blockTypeRaw)
315 b.output = bh.appendTo(b.output[:0])
316 b.output = append(b.output, a...)
317 if debugEncoder {
318 println("Adding RAW block, length", len(a), "last:", b.last)
319 }
320}
321
322// encodeRaw can be used to set the output to a raw representation of supplied bytes.
323func (b *blockEnc) encodeRawTo(dst, src []byte) []byte {

Callers 2

compressJobMethod · 0.80
nextBlockMethod · 0.80

Calls 5

setLastMethod · 0.95
setSizeMethod · 0.95
setTypeMethod · 0.95
appendToMethod · 0.95
printlnFunction · 0.85

Tested by

no test coverage detected