DecodeUntaggedDurationValue decodes a value encoded by EncodeUntaggedDurationValue.
(b []byte)
| 3104 | |
| 3105 | // DecodeUntaggedDurationValue decodes a value encoded by EncodeUntaggedDurationValue. |
| 3106 | func DecodeUntaggedDurationValue(b []byte) (remaining []byte, d duration.Duration, err error) { |
| 3107 | var months, days, nanos int64 |
| 3108 | b, _, months, err = DecodeNonsortingStdlibVarint(b) |
| 3109 | if err != nil { |
| 3110 | return b, duration.Duration{}, err |
| 3111 | } |
| 3112 | b, _, days, err = DecodeNonsortingStdlibVarint(b) |
| 3113 | if err != nil { |
| 3114 | return b, duration.Duration{}, err |
| 3115 | } |
| 3116 | b, _, nanos, err = DecodeNonsortingStdlibVarint(b) |
| 3117 | if err != nil { |
| 3118 | return b, duration.Duration{}, err |
| 3119 | } |
| 3120 | return b, duration.DecodeDuration(months, days, nanos), nil |
| 3121 | } |
| 3122 | |
| 3123 | // DecodeBitArrayValue decodes a value encoded by EncodeUntaggedBitArrayValue. |
| 3124 | func DecodeBitArrayValue(b []byte) (remaining []byte, d bitarray.BitArray, err error) { |
no test coverage detected
searching dependent graphs…