MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / deflate

Method deflate

packages/alphatab/src/zip/DeflaterEngine.ts:188–196  ·  view source on GitHub ↗

* Deflate drives actual compression of data * @param flush True to flush input buffers * @param finish Finish deflation with the current input. * @returns Returns true if progress has been made.

(flush: boolean, finish: boolean)

Source from the content-addressed store, hash-verified

186 * @returns Returns true if progress has been made.
187 */
188 public deflate(flush: boolean, finish: boolean): boolean {
189 let progress: boolean;
190 do {
191 this.fillWindow();
192 const canFlush = flush && this._inputOff === this._inputEnd;
193 progress = this._deflateSlow(canFlush, finish);
194 } while (this._pending.isFlushed && progress); // repeat while we have no pending output and progress was made
195 return progress;
196 }
197
198 private _deflateSlow(flush: boolean, finish: boolean): boolean {
199 if (this._lookahead < DeflaterConstants.minLookahead && !flush) {

Callers

nothing calls this directly

Calls 2

fillWindowMethod · 0.95
_deflateSlowMethod · 0.95

Tested by

no test coverage detected