Versions in this module Expand all Collapse all v0 v0.1.0 Nov 15, 2022 Changes in this version + var ErrorAdditionOverflow = errors.New("the addition result overflows its max value") + var ErrorBitLengthIsNotEfficient = errors.New(...) + var ErrorBitLengthIsNotPositive = errors.New("the provided bit length has to be a strictly positive number") + var ErrorDivisionByZero = errors.New("the division result is undefined for 0 value divisor") + var ErrorIndexIsNegative = errors.New("the provided index has to be not be a negative number") + var ErrorIndexIsOutOfRange = errors.New("the provided index is out of the number range") + var ErrorLengthIsNotEfficient = errors.New(...) + var ErrorLengthIsNotPositive = errors.New("the provided length has to be a strictly positive number") + var ErrorMultiplicationOverflow = errors.New("the multiplication result overflows its max value") + var ErrorReaderIsNotDecodable = errors.New("reader does not contain decodable bytes") + var ErrorShiftIsNegative = errors.New("the provided shift has to be not be a negative number") + var ErrorSubtractionUnderflow = errors.New("the subtraction result underflow its min value") + var ErrorUnequalBitLengthCardinality = errors.New("the provided bit length does not have equal cardinality with the number") + var ErrorVarIntIsInvalid = errors.New("the varint is not valid for this operation") + func BitLen(vint VarInt) int + func Compare(abits, bbits Bits) int + func Decode(r io.ReadCloser, vint VarInt) error + func Encode(vint VarInt) io.ReadCloser + func Len(vint VarInt) int + func Sortable(vint VarInt) sort.Interface + type Bits []uint + func NewBits(blen int, bytes []uint) Bits + func NewBitsBigInt(i *big.Int) Bits + func NewBitsBits(blen int, bits Bits) Bits + func NewBitsRand(blen int, rnd *rand.Rand) Bits + func NewBitsString(s string, base int) Bits + func NewBitsUint(n uint) Bits + func (bits Bits) BigInt() *big.Int + func (bits Bits) BitLen() int + func (bits Bits) Bytes() []uint + func (bits Bits) Empty() bool + func (bits Bits) Format(f fmt.State, verb rune) + func (bits Bits) String() string + func (bits Bits) To(base int) []byte + func (bits Bits) Uint() uint + type VarInt []uint + func NewVarInt(blen, len int) (VarInt, error) + func (vint VarInt) Add(i int, bits Bits) error + func (vint VarInt) And(i int, bits Bits) error + func (vint VarInt) Div(i int, bits Bits) error + func (vint VarInt) Get(i int, bits Bits) error + func (vint VarInt) GetSet(i int, bits Bits) error + func (vint VarInt) Lsh(i, n int) error + func (vint VarInt) Mod(i int, bits Bits) error + func (vint VarInt) Mul(i int, bits Bits) error + func (vint VarInt) Not(i int) error + func (vint VarInt) Or(i int, bits Bits) error + func (vint VarInt) Rsh(i, n int) error + func (vint VarInt) Set(i int, bits Bits) error + func (vint VarInt) Sub(i int, bits Bits) error + func (vint VarInt) Xor(i int, bits Bits) error