lxsmnsyc / seroval

Stringify JS values
https://seroval.vercel.app
MIT License
479 stars 4 forks source link

Better serialization for `Blob` and `File` #15

Open lxsmnsyc opened 1 year ago

lxsmnsyc commented 1 year ago

Currently Blob and File relies on ArrayBuffer serialization, which means it uses the Uint8Array indirectly. This serialization form is accurate, but is probably too large for consideration. Blob accepts Uint8Array, ArrayBuffer, DataView and string, so it's probably ideal if the string format can be utilized instead.

lxsmnsyc commented 10 months ago

To watch out: https://github.com/tc39/proposal-arraybuffer-base64

MengLinMaker commented 1 month ago

Would you recommend converting Uint8Array to base64 and back?

Sending ArrayBuffer from SolidStart.js use server is slow. Not too sure where the bottleneck is.