packBytes
packBytes copied to clipboard
Add optional genSchema(data) function to auto-generate a schema for a specific dataset. Because it only applies to that set it can optimize to make the smallest possible encoding for that...
Schema can exist as a JavaScript object, and it can be serialized to Json string, this issue is to add optional binary format so schema can be sent as binary...
Could be a great idea to have it rewrite in TS to have something like this project https://github.com/voltrevo/monorepo/tree/master/projects/typed-bytes packBytes is really great but we can't know the TS type for...
As discussed here https://github.com/uNetworking/uWebSockets.js/issues/894 it's more efficient to pre-allocate buffers and slice after encode vs calculating exact size before encode which uses more cpu cycles. Removing [getDataSize()](https://github.com/e3dio/packBytes/blob/main/packbytes.mjs#L48) function will reduce...
Received request to add similar library [micro-packed](https://github.com/paulmillr/micro-packed) to the benchmark list, and also benchmarks should be updated with latest code