Documentation ¶
Index ¶
Constants ¶
View Source
const ( PTSum = 0 PTProduct = 1 PTMin = 2 PTMax = 3 PTLiteral = 4 PTGT = 5 PTLT = 6 PTEq = 7 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BitReader ¶
type BitReader struct { S string // contains filtered or unexported fields }
func (*BitReader) ConsumeBit ¶
func (*BitReader) DiscardRestOfDigit ¶
func (r *BitReader) DiscardRestOfDigit()
type Packet ¶
type Packet struct { Version int Type int Literal int // only if pType == ptLiteral Subpackets []*Packet }
func ReadPacket ¶
ReadPacket consumes and returns a packet, as well as the total number of bits read or any error. It does *not* skip to the next digit boundary (as would be desirable for a top-level read), so it can be used recursively with operators. Do this manually with br.discardRestOfDigit()
Click to show internal directories.
Click to hide internal directories.