message-size-increase #3

Merged
sashakoshka merged 227 commits from message-size-increase into main 2025-09-07 19:27:38 -06:00
2 changed files with 129 additions and 0 deletions
Showing only changes of commit 5d84636b55 - Show all commits

View File

@ -112,6 +112,13 @@ func (this *Decoder) ReadUintN(bytes int) (value uint64, n int, err error) {
return value, n, nil return value, n, nil
} }
// ReadFloat16 decodes a 16-bit floating point value from the input reader.
func (this *Decoder) ReadFloat16() (value float32, n int, err error) {
bits, nn, err := this.ReadUint16()
n += nn; if err != nil { return 0, n, err }
return math.Float32frombits(f16bitsToF32bits(bits)), n, nil
}
// ReadFloat32 decldes a 32-bit floating point value from the input reader. // ReadFloat32 decldes a 32-bit floating point value from the input reader.
func (this *Decoder) ReadFloat32() (value float32, n int, err error) { func (this *Decoder) ReadFloat32() (value float32, n int, err error) {
bits, nn, err := this.ReadUint32() bits, nn, err := this.ReadUint32()