encoded returns the encoded form of the jEntry.
(mode encodingMode)
| 84 | |
| 85 | // encoded returns the encoded form of the jEntry. |
| 86 | func (e jEntry) encoded(mode encodingMode) uint32 { |
| 87 | switch mode.typ { |
| 88 | case lengthEncoding: |
| 89 | return e.typCode | e.length |
| 90 | case offsetEncoding: |
| 91 | return jEntryIsOffFlag | e.typCode | mode.offset |
| 92 | } |
| 93 | return 0 |
| 94 | } |
| 95 | |
| 96 | func getJEntryAt(b []byte, idx int, offset int) (jEntry, error) { |
| 97 | enc, err := getUint32At(b, idx) |
no outgoing calls
no test coverage detected