ArrayBuffer to blob conversion

前端 未结 2 500
暗喜
暗喜 2020-12-01 07:50

I have a project where I need to display djvu schemas in browser.

I found this old library on Github which, as far as I understood, converts djvu files to bmp and th

2条回答
  •  离开以前
    2020-12-01 08:07

    var buffer = new ArrayBuffer(32);
    
    new Blob([buffer]);
    

    so the Uint8Array should be

    new Blob([new Uint8Array([1, 2, 3, 4]).buffer]);
    

提交回复
热议问题