1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-22 11:30:31 +08:00

optimize(link): pack zstd en/decoding

This commit is contained in:
源文雨
2025-02-25 23:53:25 +09:00
parent 597fa8d048
commit fa7b9d4f0a
8 changed files with 58 additions and 34 deletions

View File

@@ -6,7 +6,6 @@ import (
"encoding/binary"
"encoding/hex"
"io"
"runtime"
"testing"
"golang.org/x/crypto/chacha20poly1305"
@@ -32,7 +31,6 @@ func TestXOR(t *testing.T) {
if !bytes.Equal(dec, r2.Bytes()) {
t.Fatal("unexpected xor at", i, "except", hex.EncodeToString(r2.Bytes()), "got", hex.EncodeToString(dec))
}
runtime.KeepAlive(dec)
if seq != uint32(i) {
t.Fatal("unexpected xor at", i, "seq", seq)
}