UNPKG

sixel

Version:

Sixel image format for node and browser.

33 lines 755 B
"use strict"; /** * Copyright (c) 2021 Joerg Breitbart. * @license MIT */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Params = void 0; /** * Params storage. * Used during parsing to hold up to 6 params of a SIXEL command. */ class Params { constructor() { this.length = 1; this.params = new Uint32Array(6); } reset() { this.params[0] = 0; this.length = 1; } addParam() { if (this.length < 6) { this.params[this.length++] = 0; } } addDigit(v) { if (this.length < 6) { this.params[this.length - 1] = this.params[this.length - 1] * 10 + v; } } } exports.Params = Params; //# sourceMappingURL=Params.js.map