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 | 19x 19x 19x 16x 16x | import { Sequencer } from "../types"; const encoder = /*@__PURE__*/ new TextEncoder(); const decoder = /*@__PURE__*/ new TextDecoder(); export const utf8: Sequencer<string> = { encode(ctx, data) { ctx.i += encoder.encodeInto(data, ctx.bytes.subarray(ctx.i)) .written as number; }, decode(ctx, end) { return decoder.decode(ctx.bytes.subarray(ctx.i, (ctx.i = end))); } }; |