* Add literal to buffer * @param literal Literal value to add to buffer * @returns Value indicating internal buffer is full
(literal: number)
| 714 | * @returns Value indicating internal buffer is full |
| 715 | */ |
| 716 | public tallyLit(literal: number): boolean { |
| 717 | this._dBuf[this._lastLit] = 0; |
| 718 | this._lBuf[this._lastLit++] = literal; |
| 719 | this._literalTree.freqs[literal]++; |
| 720 | return this.isFull(); |
| 721 | } |
| 722 | |
| 723 | private static _lCode(length: number): number { |
| 724 | if (length === 255) { |