/native

Translate between numbers in fixed sizes and byte sequences in (host) native endianess.

Primary LanguageGoApache License 2.0Apache-2.0

native

Go Reference GitHub build and test Go Report Card Coverage

native translates between numbers in fixed sizes and byte sequences in (host) native endianess. Think of it as the missing convenience combination of bytes.Buffer and encoding/binary for fixed size numbers (uint8, uint16, uint32, and uint64).

Especially useful when dealing with netlink. And no need to manually unroll encoding/binary interface calls depending on endianess at runtime.

Supported Go Versions

native supports versions of Go that are noted by the Go release policy, that is, major versions N and N-1 (where N is the current major version).

Copyright and License

native is Copyright 2023 Harald Albrecht, and licensed under the Apache License, Version 2.0.