tape: Remove GBEU
This commit is contained in:
@@ -99,27 +99,6 @@ func (this *Encoder) WriteUintN(value uint64, bytes int) (n int, err error) {
|
||||
return n, nil
|
||||
}
|
||||
|
||||
// EncodeGBEU encodes a growing unsigned integer of up to 64 bits to the output
|
||||
// writer.
|
||||
func (this *Encoder) EncodeGBEU(value uint64) (n int, err error) {
|
||||
buffer := [16]byte { }
|
||||
|
||||
window := (GBEUSize(value) - 1) * 7
|
||||
index := 0
|
||||
for window >= 0 {
|
||||
chunk := uint8(value >> window) & 0x7F
|
||||
if window > 0 {
|
||||
chunk |= 0x80
|
||||
}
|
||||
buffer[index] = chunk
|
||||
|
||||
index += 1
|
||||
window -= 7
|
||||
}
|
||||
|
||||
return this.Write(buffer[:])
|
||||
}
|
||||
|
||||
// WriteFloat32 encodes a 32-bit floating point value to the output writer.
|
||||
func (this *Encoder) WriteFloat32(value float32) (n int, err error) {
|
||||
return this.WriteUint32(math.Float32bits(value))
|
||||
|
||||
Reference in New Issue
Block a user