整理代码

This commit is contained in:
2025-02-20 12:31:02 +08:00
parent 84362607c2
commit 71b5229198
17 changed files with 14 additions and 183 deletions

View File

@@ -1,17 +0,0 @@
package core
import (
"bytes"
"encoding/hex"
"testing"
)
func TestWriteUInt16LE(t *testing.T) {
buff := &bytes.Buffer{}
WriteUInt32LE(66538, buff)
result := hex.EncodeToString(buff.Bytes())
expected := "ea030100"
if result != expected {
t.Error(result, "not equals to", expected)
}
}

View File

@@ -1,15 +0,0 @@
// rle_test.go
package core
import (
"fmt"
"testing"
)
func TestSum(t *testing.T) {
input := []byte{
192, 44, 200, 8, 132, 200, 8, 200, 8, 200, 8, 200, 8, 0, 19, 132, 232, 8, 12, 50, 142, 66, 77, 58, 208, 59, 225, 25, 1, 0, 0, 0, 0, 0, 0, 0, 132, 139, 33, 142, 66, 142, 66, 142, 66, 208, 59, 4, 43, 1, 0, 0, 0, 0, 0, 0, 0, 132, 203, 41, 142, 66, 142, 66, 142, 66, 208, 59, 96, 0, 1, 0, 0, 0, 0, 0, 0, 0, 132, 9, 17, 142, 66, 142, 66, 142, 66, 208, 59, 230, 27, 1, 0, 0, 0, 0, 0, 0, 0, 132, 200, 8, 9, 17, 139, 33, 74, 25, 243, 133, 14, 200, 8, 132, 200, 8, 200, 8, 200, 8, 200, 8,
}
out := Decompress(input, 64, 64, 3)
fmt.Println(out)
}