encodingModeForIdx determines which encoding mode we choose to use for a given i-th entry in an array or object.
(i int, offset uint32)
| 72 | // encodingModeForIdx determines which encoding mode we choose to use for a |
| 73 | // given i-th entry in an array or object. |
| 74 | func encodingModeForIdx(i int, offset uint32) encodingMode { |
| 75 | if i%offlenStride == 0 { |
| 76 | return offsetEncode(offset) |
| 77 | } |
| 78 | return lengthMode |
| 79 | } |
| 80 | |
| 81 | func (j jsonArray) encode(appendTo []byte) (e jEntry, b []byte, err error) { |
| 82 | encodingStartPosition := len(appendTo) |
no test coverage detected
searching dependent graphs…