DecodeString decodes a string value.
(b []byte)
| 2180 | |
| 2181 | // DecodeString decodes a string value. |
| 2182 | func (d BinaryEncoding) DecodeString(b []byte) (value string) { |
| 2183 | size := d.DecodeInt32(b) |
| 2184 | v := (*rt.GoString)(unsafe.Pointer(&value)) |
| 2185 | v.Ptr = rt.IndexPtr(*(*unsafe.Pointer)(unsafe.Pointer(&b)), byteTypeSize, 4) |
| 2186 | v.Len = int(size) |
| 2187 | return |
| 2188 | } |
| 2189 | |
| 2190 | // DecodeBinary decodes a binary value. |
| 2191 | func (d BinaryEncoding) DecodeBytes(b []byte) (value []byte) { |
no test coverage detected