Enabled arm64 encoding

This commit is contained in:
Eduard Urbach 2025-03-06 16:54:28 +01:00
parent e3957fc318
commit fee1b27bfe
Signed by: eduard
GPG key ID: 49226B848C78F6C8
9 changed files with 103 additions and 29 deletions

View file

@ -7,10 +7,10 @@ import (
// Finalize returns the final raw data slice and a map of labels with their respective indices.
// It will try to reuse existing data whenever possible.
func (data Data) Finalize() ([]byte, map[string]int32) {
func (data Data) Finalize() ([]byte, map[string]uint32) {
var (
keys = make([]string, 0, len(data))
positions = make(map[string]int32, len(data))
positions = make(map[string]uint32, len(data))
capacity = 0
)
@ -30,9 +30,9 @@ func (data Data) Finalize() ([]byte, map[string]int32) {
position := bytes.Index(final, raw)
if position != -1 {
positions[key] = int32(position)
positions[key] = uint32(position)
} else {
positions[key] = int32(len(final))
positions[key] = uint32(len(final))
final = append(final, raw...)
}
}