Documentation ¶
Index ¶
- type Uint128
- func (u Uint128) Add(n uint64) Uint128
- func (u Uint128) And(o Uint128) Uint128
- func (u Uint128) AppendBytes(buf []byte) []byte
- func (u Uint128) Compare(o Uint128) int
- func (u Uint128) Equal(o Uint128) bool
- func (u Uint128) GetBytes() []byte
- func (u Uint128) Or(o Uint128) Uint128
- func (u Uint128) String() string
- func (u Uint128) Sub(n uint64) Uint128
- func (u Uint128) Xor(o Uint128) Uint128
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Uint128 ¶
type Uint128 struct {
Hi, Lo uint64
}
Uint128 is a big-endian 128 bit unsigned integer which wraps two uint64s.
func FromBytes ¶
FromBytes parses the byte slice as a 128 bit big-endian unsigned integer. The caller is responsible for ensuring the byte slice contains 16 bytes.
func FromString ¶
FromString parses a hexadecimal string as a 128-bit big-endian unsigned integer.
func (Uint128) AppendBytes ¶
AppendBytes appends big-endian byte representation to the buffer and returns the buffer.
Click to show internal directories.
Click to hide internal directories.