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 | 2x 2x 166x 166x 166x 166x 166x | import {MsgPackEncoderFast as EncoderMessagePack} from '@jsonjoy.com/json-pack/lib/msgpack/MsgPackEncoderFast'; import type {Op} from '../../op'; export class Encoder extends EncoderMessagePack { public encode(patch: Op[]): Uint8Array { this.writer.reset(); this.encodeArrayHeader(patch.length); const length = patch.length; for (let i = 0; i < length; i++) patch[i].encode(this); return this.writer.flush(); } } |