(i)
| 912 | return getBodyChunks(item.columnLength, item.rowLength, 0, null, null, index); |
| 913 | }); |
| 914 | function transformChunkedItem(i) { |
| 915 | const item = items[i]; |
| 916 | const chunkedItem = { |
| 917 | header: item.header, |
| 918 | offset: 0 |
| 919 | }; |
| 920 | for (let j = 0; j < item.chunk.length; j = j + chunkLength) { |
| 921 | let end = j + chunkLength; |
| 922 | if (end >= item.chunk.length) { |
| 923 | end = item.chunk.length; |
| 924 | chunkedItem.frameEnded = true; |
| 925 | } |
| 926 | const start = j; |
| 927 | if (start === 0) { |
| 928 | //sum a few bytes |
| 929 | chunkedItem.chunk = Buffer.concat([ utils.allocBufferUnsafe(9), item.chunk.slice(start, end) ]); |
| 930 | chunkedItem.offset = 9; |
| 931 | } |
| 932 | else { |
| 933 | chunkedItem.chunk = item.chunk.slice(start, end); |
| 934 | chunkedItem.offset = 0; |
| 935 | } |
| 936 | parser._transform(chunkedItem, null, helper.throwop); |
| 937 | } |
| 938 | } |
| 939 | for (let i = 0; i < items.length; i++) { |
| 940 | transformChunkedItem(i); |
| 941 | } |
no test coverage detected