1
0
mirror of https://github.com/fumiama/go-base16384.git synced 2026-06-24 05:18:32 +08:00

fix: encoder/decoder

This commit is contained in:
源文雨
2025-10-27 22:26:01 +08:00
parent d548cdd86f
commit 2840c604c1
7 changed files with 240 additions and 87 deletions

View File

@@ -24,6 +24,7 @@ func EncodeLen(in int) (out int) {
return
}
//go:nosplit
func Encode(b []byte) (encd []byte) {
outlen := len(b) / 7 * 8
offset := len(b) % 7
@@ -44,6 +45,7 @@ func Encode(b []byte) (encd []byte) {
return
}
//go:nosplit
func EncodeTo(b, encd []byte) (int, error) {
outlen := len(b) / 7 * 8
offset := len(b) % 7