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

Method EncodeBlob

ethstorage/storage_manager.go:89–92  ·  view source on GitHub ↗
(blob []byte, blobHash common.Hash, kvIdx, size uint64)

Source from the content-addressed store, hash-verified

87}
88
89func (s *StorageManager) EncodeBlob(blob []byte, blobHash common.Hash, kvIdx, size uint64) []byte {
90 encodeType, encodeKey := s.getEncodingParams(kvIdx, blobHash)
91 return EncodeChunk(size, blob, encodeType, encodeKey)
92}
93
94func (s *StorageManager) DecodeBlob(blob []byte, blobHash common.Hash, kvIdx, size uint64) []byte {
95 encodeType, encodeKey := s.getEncodingParams(kvIdx, blobHash)

Callers 2

TestEncodingFunction · 0.95
downloadRangeMethod · 0.80

Calls 2

getEncodingParamsMethod · 0.95
EncodeChunkFunction · 0.85

Tested by 1

TestEncodingFunction · 0.76