MCPcopy Create free account
hub / github.com/DNAProject/DNA / DecompressBlockData

Function DecompressBlockData

cmd/utils/export.go:127–134  ·  view source on GitHub ↗
(data []byte, compressType byte)

Source from the content-addressed store, hash-verified

125}
126
127func DecompressBlockData(data []byte, compressType byte) ([]byte, error) {
128 switch compressType {
129 case COMPRESS_TYPE_ZLIB:
130 return ZLibDecompress(data)
131 default:
132 return nil, fmt.Errorf("unknown compress type")
133 }
134}
135
136func ZLibCompress(data []byte) ([]byte, error) {
137 buf := bytes.NewBuffer(nil)

Callers 1

importBlocksFunction · 0.92

Calls 2

ZLibDecompressFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected