borc
borc copied to clipboard
Assimilate your JavaScript objects into cbor
Its a splendid library but it doesn't seem to have types for typescript. Am i missing something or it simply doesn't have them?
This array does not survive an encode-decode roundtrip: ``` var array = [90,173,127,166,6,31,120,100,46,152,174,201,155, 230,196,27,129,226,247,145,216,131,118,238,94,134,154,16,248,243,175,163, 22,89,96,179,161,220,197,54,151,59,112,199,252,159,176,105,88,15,103,221, 101,121,242,189,11,69,53,4,13,203,30,97,192,68,83,233,231,240,58,210,207, 246,191,12,208,32,93,217,184,91,167,114,55,81,19,60,104,168,36,87,194,0,178, 72,136,150,108,236,51,172,254,5,123,71,43,137,148,23,146,73,200,2,244,139, 206,188,133,249,225,18,212,20,74,48,170,180,160,34,17,76,33,49,28,250,214, 132,195,229,140,171,255,187,157,147,56,153,253,37,215,61,45,158,135,115,41, 21,7,209,234,219,26,98,38,239,24,86,185,85,213,14,122,190,143,40,107,95,109, 228,92,222,251,198,169,10,186,25,117,245,164,106,75,125,79,128,142,67,149, 80,99,63,1,29,181,237,9,35,182,57,66,223,156,52,193,65,177,50,44,138,205,218, 241,102,202,235,124,165,47,8,77,227,232,183,39,144,116,126,224,62,42,84,162, 111,211,130,82,113,204,78,119,3,70,141,110,64]; borc.decode(borc.encode(array)); ``` results in ```...
Is it possible to add BigInt encoder? `Error: Unknown type: bigint`
I want BigNumber integers and ECMAscript bigints to be encoded as normal integers, if they would fit. https://github.com/hildjj/node-cbor/tree/main/packages/cbor has a `collapseBigIntegers` param to do this. Is there anything like this...
## Background: I've been tracing performance of a service-worker waking up after it's already been running before. The code in the service worker is loaded via https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/importScripts It's bundled and...
Hi, this more than an issue is a question, i need to send 65 bytes on each call i make, now im using cbor.encode to encode an object: `const cborEncoded...
https://github.com/dignifiedquire/borc/blob/f8b6b7630250e2ee5509f7104529490a388c2cc7/src/decoder.js#L58 Looks like you removed node globals somewhat recently, but you missed one. This `global` reference is breaking in the latest version of Angular.
All use of node Buffers have been replaced with Uint8Arrays BREAKING CHANGES: - `cbor.encode` used to return a Buffer, now it returns a Uint8Array
Hi, just wondering if there are any typescript declaration files for this lib? I looked around, but couldn’t find any, just wanted be sure I was looking in the right...
Current implementation will copy memory if `Uint8Array` is pushed. Proposed change avoids unnecessary coping by creating a Buffer view of the underlying `ArrayBuffer` instead.