MCPcopy Create free account
hub / github.com/ethstorage/es-node / EncodeChunk

Function EncodeChunk

ethstorage/data_shard.go:248–250  ·  view source on GitHub ↗

EncodeChunk encodes bs and returned a chunk-sized encoded one

(chunkSize uint64, bs []byte, encodeType uint64, encodeKey common.Hash)

Source from the content-addressed store, hash-verified

246
247// EncodeChunk encodes bs and returned a chunk-sized encoded one
248func EncodeChunk(chunkSize uint64, bs []byte, encodeType uint64, encodeKey common.Hash) []byte {
249 return encodeChunk(chunkSize, bs, encodeType, encodeKey)
250}
251
252func encodeChunk(chunkSize uint64, bs []byte, encodeType uint64, encodeKey common.Hash) []byte {
253 if len(bs) > int(chunkSize) {

Callers 1

EncodeBlobMethod · 0.85

Calls 1

encodeChunkFunction · 0.85

Tested by

no test coverage detected