Enabled arm64 encoding
This commit is contained in:
parent
e3957fc318
commit
fee1b27bfe
9 changed files with 103 additions and 29 deletions
|
@ -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...)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue