}
data = this._zlibs[streamId].inflate(data, uncompressedSize);
- if (data.length != uncompressedSize) {
- throw new Error("Incomplete zlib block");
- }
}
display.blitRgbImage(x, y, width, height, data, 0, false);
}
data = this._zlibs[streamId].inflate(data, uncompressedSize);
- if (data.length != uncompressedSize) {
- throw new Error("Incomplete zlib block");
- }
}
// Convert indexed (palette based) image data to RGB
inflate(this.strm, 0); // Flush argument not used.
+ if (this.strm.next_out != expected) {
+ throw new Error("Incomplete zlib block");
+ }
+
return new Uint8Array(this.strm.output.buffer, 0, this.strm.next_out);
}