We have a binary file on client. It's scaned page from book which come to client somehow compressed. We have a decoder(on client), which output a TypedArray which contains BMP data file. We need to render it, as fast as possible. BMP size is about 3000000 bytes(after decoding, it's length of returned typedArray). We tried a lot of solutions but on slow PCs it didn't work. For example fastest way which we found: We build blob from TypedArray. Create URL to this blob and specify it as src attribute on image source. It tooks about 22000ms to render 20 pages. Also we tried to render it in base64 with data: URL specified in src tag also(34000ms). We tried to render it on canvas. But there are problems such as we use drawImage on canvas which require loaded image object. May be some how we can render it with WebGL with hardware acceleration?
PS In the time included decode time which are the same in all cases.
PS I can attach code samples which we tried.