DecodeUntaggedFloat32Value decodes a value encoded by EncodeUntaggedFloat32Value.
(b []byte)
| 2946 | |
| 2947 | // DecodeUntaggedFloat32Value decodes a value encoded by EncodeUntaggedFloat32Value. |
| 2948 | func 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. |
| 2958 | func DecodeBytesValue(b []byte) (remaining []byte, data []byte, err error) { |
no test coverage detected
searching dependent graphs…