Documentation ¶
Overview ¶
Package binary ... thanks to https://github.com/skip2/go-qrcode/blob/master/bitset/bitset.go I cannot do any better for now, so I just learn and write it again~
Index ¶
- type Binary
- func (b *Binary) Append(other *Binary)
- func (b *Binary) AppendBools(booleans ...bool)
- func (b *Binary) AppendByte(byt byte, numBits int) error
- func (b *Binary) AppendBytes(byts ...byte)
- func (b *Binary) AppendNumBools(num int, boolean bool)
- func (b *Binary) AppendUint32(value uint32, numBits int)
- func (b *Binary) At(pos int) bool
- func (b *Binary) Bytes() []byte
- func (b *Binary) Copy() *Binary
- func (b *Binary) EqualTo(other *Binary) bool
- func (b *Binary) Len() int
- func (b *Binary) String() string
- func (b *Binary) Subset(start, end int) (*Binary, error)
- func (b *Binary) VisitAll(f IterFunc)
- type IterFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binary ¶
type Binary struct {
// contains filtered or unexported fields
}
Binary struct contains bits stream and methods to be called from outside exsample: b.Len() b.Subset(start, end) b.At(pos)
func NewFromBinaryString ¶
NewFromBinaryString ... generate Bitset from binary string auto get length
func (*Binary) AppendBools ¶
AppendBools append multi bool after the bit stream of b
func (*Binary) AppendByte ¶
AppendByte ... specified num bits to append
func (*Binary) AppendNumBools ¶
AppendNumBools appends num bits of value value.
func (*Binary) AppendUint32 ¶
AppendUint32 other bitset link another Bitset to after the b
Click to show internal directories.
Click to hide internal directories.