mirror of
https://github.com/hanzo-ds/native.git
synced 2026-10-30 20:00:34 +00:00
Module path, package names, and identifiers de-branded to native/proto/compress/ pool/tracing. Server wire-protocol strings preserved. Vendored codec surface used by hanzo-ds/go (proto + compress).
18 lines
318 B
Go
18 lines
318 B
Go
//go:build (amd64 || arm64 || riscv64) && !purego
|
|
|
|
package proto
|
|
|
|
import "unsafe"
|
|
|
|
// slice represents slice header.
|
|
//
|
|
// Used in optimizations when we can interpret [N]T as [M]byte, where
|
|
// M = sizeof(T) * N.
|
|
//
|
|
// NB: careful with endianness!
|
|
type slice struct {
|
|
Data unsafe.Pointer
|
|
Len uintptr
|
|
Cap uintptr
|
|
}
|