(b []byte, idx int, offset int)
| 80 | } |
| 81 | |
| 82 | func getJEntryAt(b []byte, idx int, offset int) (jEntry, error) { |
| 83 | enc, err := getUint32At(b, idx) |
| 84 | if err != nil { |
| 85 | return jEntry{}, err |
| 86 | } |
| 87 | length := enc & jEntryOffLenMask |
| 88 | if (enc & jEntryIsOffFlag) != 0 { |
| 89 | length -= uint32(offset) |
| 90 | } |
| 91 | return jEntry{ |
| 92 | length: length, |
| 93 | typCode: enc & jEntryTypeMask, |
| 94 | }, nil |
| 95 | } |
| 96 | |
| 97 | // decodeJEntry decodes a 4-byte JEntry from a buffer. The current offset is |
| 98 | // required because a JEntry can either encode a length or an offset, and while |
no test coverage detected
searching dependent graphs…