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"
@@ -478,17 +477,14 @@ func (c *daChunkV7) Hash() (common.Hash, error) {
478477
479478// decompressV7Bytes decompresses the given blob bytes into the original payload bytes.
480479func decompressV7Bytes (compressedBytes []byte ) ([]byte , error ) {
481- var res []byte
482-
483480 compressedBytes = append (zstdMagicNumber , compressedBytes ... )
484- r := bytes .NewReader (compressedBytes )
485- zr , err := zstd .NewReader (r , zstd .WithDecoderConcurrency (1 ))
481+ zr , err := zstd .NewReader (nil , zstd .WithDecoderConcurrency (1 ))
486482 if err != nil {
487483 return nil , fmt .Errorf ("failed to create zstd reader: %w" , err )
488484 }
489485 defer zr .Close ()
490486
491- res , err = zr .DecodeAll (compressedBytes , res )
487+ res , err : = zr .DecodeAll (compressedBytes , nil )
492488 if err != nil {
493489 return nil , fmt .Errorf ("failed to decompress zstd data: %w" , err )
494490 }
You can’t perform that action at this time.
0 commit comments