Split api of inflate

Added ability to read data chunk wise.
This commit is contained in:
Niko Lehto
2020-02-03 10:19:00 +01:00
committed by Lauri Kasanen
parent dbe2930758
commit 9ca647667b
2 changed files with 20 additions and 7 deletions

View File

@@ -174,7 +174,9 @@ export default class TightDecoder {
return false;
}
data = this._zlibs[streamId].inflate(data, uncompressedSize);
this._zlibs[streamId].setInput(data);
data = this._zlibs[streamId].inflate(uncompressedSize);
this._zlibs[streamId].setInput(null);
}
display.blitRgbImage(x, y, width, height, data, 0, false);
@@ -219,7 +221,9 @@ export default class TightDecoder {
return false;
}
data = this._zlibs[streamId].inflate(data, uncompressedSize);
this._zlibs[streamId].setInput(data);
data = this._zlibs[streamId].inflate(uncompressedSize);
this._zlibs[streamId].setInput(null);
}
// Convert indexed (palette based) image data to RGB