docs: reorder & testing

This commit is contained in:
Ilia Denisov
2026-05-07 00:58:53 +03:00
committed by GitHub
parent f446c6a2ac
commit 604fe40bcf
148 changed files with 9150 additions and 2757 deletions
+22
View File
@@ -0,0 +1,22 @@
package transcoder
import (
"encoding/binary"
"github.com/google/uuid"
)
// uuidToHiLo splits a 16-byte UUID into the two big-endian uint64
// halves used by the FlatBuffers `common.UUID` struct (`hi` carries
// bytes 0..7, `lo` carries bytes 8..15).
func uuidToHiLo(value uuid.UUID) (uint64, uint64) {
return binary.BigEndian.Uint64(value[0:8]), binary.BigEndian.Uint64(value[8:16])
}
// uuidFromHiLo reverses uuidToHiLo.
func uuidFromHiLo(hi, lo uint64) uuid.UUID {
var value uuid.UUID
binary.BigEndian.PutUint64(value[0:8], hi)
binary.BigEndian.PutUint64(value[8:16], lo)
return value
}