🔴 pack do not work when encoding large ArrayBuffers / Blobs
See original GitHub issueHi, I found a bug while packing something like: {name: 'test', content: Blob(900Mo)}
:
the resulting packed message is only 8Ko also, it crashes when decoding on server, and returns {} when decoding on the client
note that it works for smaller files (~500Mo).
message EDITED because my first repro was buggy
see
- this message instead with a way simpler repro: https://github.com/kriszyp/msgpackr/issues/20#issuecomment-778310595
- (or this for a slightly more complex one https://github.com/kriszyp/msgpackr/issues/20#issuecomment-778301351 )
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
ArrayBuffer to base64 encoded string - Stack Overflow
var base64String = btoa(String. fromCharCode. apply(null, new Uint8Array(arrayBuffer))); In ES6, the syntax is a little simpler:
Read more >Empty response when responseType is `blob` or `arraybuffer`.
Summary Axios can't handle blob and arraybuffer responseType. ... This is not working fine for large files, file is downloaded after 1 ...
Read more >Buffer | Node.js v19.3.0 Documentation
This is the default character encoding. When decoding a Buffer into a string that does not exclusively contain valid UTF-8 data, the Unicode...
Read more >Blob.arrayBuffer() - Web APIs - MDN Web Docs
A promise that resolves with an ArrayBuffer that contains the blob's data in binary form. Exceptions. While this method doesn't throw exceptions ...
Read more >ArrayBuffer, binary arrays - The Modern JavaScript Tutorial
In web-development we meet binary data mostly while dealing with files (create, upload, download). Another typical use case is image ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
1.2.6 should have significantly improved buffer performance (about 8x fast in the browser, by my estimates).
wow, thanks you so much ! 🎉