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

Method encodeRLE

zstd/blockenc.go:433–440  ·  view source on GitHub ↗

encodeRLE will encode an RLE block.

(val byte, length uint32)

Source from the content-addressed store, hash-verified

431
432// encodeRLE will encode an RLE block.
433func (b *blockEnc) encodeRLE(val byte, length uint32) {
434 var bh blockHeader
435 bh.setLast(b.last)
436 bh.setSize(length)
437 bh.setType(blockTypeRLE)
438 b.output = bh.appendTo(b.output)
439 b.output = append(b.output, val)
440}
441
442// fuzzFseEncoder can be used to fuzz the FSE encoder.
443func fuzzFseEncoder(data []byte) int {

Callers 1

encodeMethod · 0.95

Calls 4

setLastMethod · 0.95
setSizeMethod · 0.95
setTypeMethod · 0.95
appendToMethod · 0.95

Tested by

no test coverage detected