(b []byte, idx int, offset int)
| 94 | } |
| 95 | |
| 96 | func getJEntryAt(b []byte, idx int, offset int) (jEntry, error) { |
| 97 | enc, err := getUint32At(b, idx) |
| 98 | if err != nil { |
| 99 | return jEntry{}, err |
| 100 | } |
| 101 | length := enc & jEntryOffLenMask |
| 102 | if (enc & jEntryIsOffFlag) != 0 { |
| 103 | length -= uint32(offset) |
| 104 | } |
| 105 | return jEntry{ |
| 106 | length: length, |
| 107 | typCode: enc & jEntryTypeMask, |
| 108 | }, nil |
| 109 | } |
| 110 | |
| 111 | // decodeJEntry decodes a 4-byte JEntry from a buffer. The current offset is |
| 112 | // required because a JEntry can either encode a length or an offset, and while |
no test coverage detected