Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 19x 19x 19x 64848x 64848x 64844x 64844x 64836x 64836x 64836x 64836x 64836x 41112x | import { define } from "../define"; import { StringFactory } from "../types"; export const string: StringFactory = (encoding, headSd) => define( (ctx, data) => { const head = ctx.i; headSd.ser(ctx, 0); const begin = ctx.i; encoding.encode(ctx, data); const end = ctx.i; const size = end - begin; ctx.i = head; headSd.ser(ctx, size); ctx.i = end; }, (ctx) => encoding.decode(ctx, headSd.des(ctx) + ctx.i) ); |