tape: Add tag functions to the encoder
This commit is contained in:
@@ -140,3 +140,10 @@ func (this *Decoder) ReadFloat64() (value float64, n int, err error) {
|
||||
n += nn; if err != nil { return 0, n, err }
|
||||
return math.Float64frombits(bits), n, nil
|
||||
}
|
||||
|
||||
// ReadTag decodes a [Tag] from the input reader.
|
||||
func (this *Decoder) ReadTag() (value Tag, n int, err error) {
|
||||
uncasted, nn, err := this.ReadUint8()
|
||||
n += nn; if err != nil { return 0, n, err }
|
||||
return Tag(uncasted), n, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user