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 | 14x 14x 10x 34090x 34090x 34089x 34089x 34084x 34084x 34084x 34084x 34084x 20614x | 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)) ); |