MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / DecodeUntaggedFloat32Value

Function DecodeUntaggedFloat32Value

pkg/util/encoding/encoding.go:2948–2955  ·  view source on GitHub ↗

DecodeUntaggedFloat32Value decodes a value encoded by EncodeUntaggedFloat32Value.

(b []byte)

Source from the content-addressed store, hash-verified

2946
2947// DecodeUntaggedFloat32Value decodes a value encoded by EncodeUntaggedFloat32Value.
2948func DecodeUntaggedFloat32Value(b []byte) (remaining []byte, f float32, err error) {
2949 if len(b) < 4 {
2950 return b, 0, fmt.Errorf("float32 value should be exactly 4 bytes: %d", len(b))
2951 }
2952 var i uint32
2953 b, i, err = DecodeUint32Ascending(b)
2954 return b, math.Float32frombits(i), err
2955}
2956
2957// DecodeBytesValue decodes a value encoded by EncodeBytesValue.
2958func DecodeBytesValue(b []byte) (remaining []byte, data []byte, err error) {

Callers 1

DecodeFunction · 0.92

Calls 2

DecodeUint32AscendingFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…