File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 11package encoding
22
33import (
4- "bytes"
54 "encoding/binary"
65 "encoding/hex"
76 "encoding/json"
@@ -474,17 +473,14 @@ func (c *daChunkV7) Hash() (common.Hash, error) {
474473
475474// decompressV7Bytes decompresses the given blob bytes into the original payload bytes.
476475func decompressV7Bytes (compressedBytes []byte ) ([]byte , error ) {
477- var res []byte
478-
479476 compressedBytes = append (zstdMagicNumber , compressedBytes ... )
480- r := bytes .NewReader (compressedBytes )
481- zr , err := zstd .NewReader (r , zstd .WithDecoderConcurrency (1 ))
477+ zr , err := zstd .NewReader (nil , zstd .WithDecoderConcurrency (1 ))
482478 if err != nil {
483479 return nil , fmt .Errorf ("failed to create zstd reader: %w" , err )
484480 }
485481 defer zr .Close ()
486482
487- res , err = zr .DecodeAll (compressedBytes , res )
483+ res , err : = zr .DecodeAll (compressedBytes , nil )
488484 if err != nil {
489485 return nil , fmt .Errorf ("failed to decompress zstd data: %w" , err )
490486 }
You can’t perform that action at this time.
0 commit comments