MCPcopy
hub / github.com/xtermjs/xterm.js / put

Method put

addons/addon-image/src/SixelHandler.ts:65–83  ·  view source on GitHub ↗
(data: Uint32Array, start: number, end: number)

Source from the content-addressed store, hash-verified

63 }
64
65 public put(data: Uint32Array, start: number, end: number): void {
66 if (this._aborted || !this._dec) {
67 return;
68 }
69 this._size += end - start;
70 if (this._size > this._opts.sixelSizeLimit) {
71 console.warn(`SIXEL: too much data, aborting`);
72 this._aborted = true;
73 this._dec.release();
74 return;
75 }
76 try {
77 this._dec.decode(data, start, end);
78 } catch (e) {
79 console.warn(`SIXEL: error while decoding image - ${e}`);
80 this._aborted = true;
81 this._dec.release();
82 }
83 }
84
85 public unhook(success: boolean): boolean | Promise<boolean> {
86 if (this._aborted || !success || !this._dec) {

Callers

nothing calls this directly

Calls 3

releaseMethod · 0.80
warnMethod · 0.65
decodeMethod · 0.45

Tested by

no test coverage detected