(tv scode.Bytes)
| 579 | } |
| 580 | |
| 581 | func DecodeName(tv scode.Bytes) (string, scode.Bytes) { |
| 582 | namelen, tv := DecodeLength(tv) |
| 583 | if tv == nil || namelen > len(tv) { |
| 584 | return "", nil |
| 585 | } |
| 586 | return string(tv[:namelen]), tv[namelen:] |
| 587 | } |
| 588 | |
| 589 | func DecodeLength(tv scode.Bytes) (int, scode.Bytes) { |
| 590 | namelen, n := binary.Uvarint(tv) |
no test coverage detected