Skip to content

Weborama/uint128

Repository files navigation

github.com/weborama/uint128

Godoc for weborama/cidr Go Report Card Go golangci-lint

This package provides an implementation of a 128 bit unsigned integer with some implementations of:

  • arithmetic operators (Add, Sub, Incr, Decr)
  • binary operations (AND, OR, XOR, NOT, AND NOT, shifts)
  • math/bits operations (LeadingZeros, Len, OnesCount, Reverse, ReverseBytes, TrailingZeros)

Missing operators (Mult, Div, Mod, RotateLeft etc.) to be added later.

Uses a modified copy (changes to the generated package declaration) of make_tables.go from math/bits as well as code sourced from github.com/mengzhuo/uint128 and github.com/davidminor/uint128.

Original use case for this package is implementing IPv6 calculations (see github.com/weborama/cidr).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages