Skip to content

Commit

Permalink
Update decrypt.go
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Jul 30, 2024
1 parent c0eb8b7 commit 7b532da
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions pkg/aea/decrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,17 +275,7 @@ func decryptCluster(ctx context.Context, r io.ReadSeeker, mainKey []byte, cluste
"all": len(decryptedData) == int(size),
}).Debug("NOCOMPRESS")
segments[index] = decryptedData
// <-decryptedData
case LZMA:
var decomp []byte
lzfse.DecodeLZVNBuffer(decryptedData, decomp)
log.WithFields(log.Fields{
"cluster": cindex,
"segment": index,
"size": humanize.IBytes(uint64(len(decomp))),
"all": len(decomp) == int(size),
}).Debug("LZMA")
segments[index] = decomp[:seg.DecompressedSize]
// <-decryptedData
case LZBITMAP:
var decomp []byte
lzfse.LzBitMapDecompress(decryptedData, decomp)
Expand All @@ -309,6 +299,16 @@ func decryptCluster(ctx context.Context, r io.ReadSeeker, mainKey []byte, cluste
"all": len(decomp) == int(size),
}).Debug("LZFSE")
segments[index] = decomp[:seg.DecompressedSize]
case LZMA:
var decomp []byte
lzfse.DecodeLZVNBuffer(decryptedData, decomp)
log.WithFields(log.Fields{
"cluster": cindex,
"segment": index,
"size": humanize.IBytes(uint64(len(decomp))),
"all": len(decomp) == int(size),
}).Debug("LZMA")
segments[index] = decomp[:seg.DecompressedSize]
case ZLIB:
zr, err := zlib.NewReader(bytes.NewReader(decryptedData))
if err != nil {
Expand Down

0 comments on commit 7b532da

Please sign in to comment.