Skip to main content
Filter by
Sorted by
Tagged with
2 votes
2 answers
153 views

Since TypeScript 5.9 we have (roughly speaking) Uint8Array = Uint8Array<ArrayBufferLike> = Uint8Array<ArrayBuffer | SharedArrayBuffer>. Now I am looking for a clean and idiomatic way to ...
Simon Warta's user avatar
  • 11.5k
0 votes
1 answer
109 views

Situation: A JSON object that has an array of ~3000 elements. Each element is in format base64String.base64String.base64String.base64String.... Somewhere around 20-30 base64String separated with .. ...
Marko Taht's user avatar
  • 1,558
1 vote
0 answers
120 views

I am using the NPM package postal-mime to process inbound emails through cloudflare workers. Similar code to on this guide. https://docs.emailengine.app/how-to-parse-emails-with-cloudflare-email-...
Mark Walker's user avatar
  • 1,279
0 votes
0 answers
284 views

I have a AudioBuffer from AudioContext, and I get Float32Array from AudioBuffer.getChannelData,It's in range -1 to 1, and I dont know how to convert the data into Uint8Array, then I can encode it into ...
apm29's user avatar
  • 3
0 votes
4 answers
853 views

How can I urlencode a UInt8Array in JavaScript? using encodeURIComponent does not work, for example with encodeURIComponent((new Uint8Array([72,101,108,108,111,32,87,111,114,108,100]))); I expected: ...
hanshenrik's user avatar
  • 22.4k
1 vote
1 answer
2k views

Background I'm generating a PDF file dynamically in the backend of my web app using pdf-lib. Then, I send the PDF bytes in the form of Uint8Array to frontend in order to open a new tab that will ...
IdoBa's user avatar
  • 435
0 votes
1 answer
989 views

I am trying to load a font for pdf-lib to use. In order to use it, i must provide a Uint8Array for pdfDoc.embedFont(font); For some reason, whenever i create the UInt8Array, it returns empty. The ...
skelyvelocirap's user avatar
-3 votes
2 answers
836 views

I have the problem where I want to pass a uint8_t[] array as a parameter to a function pointer defined as `typedef void (dangerousC)(void); Also, I'm using Windows API headers. Assume the variable raw ...
block103's user avatar
0 votes
0 answers
286 views

I am currently trying to load a .bmp image file with Deno and then convert the data of the image into a black/white Uint8Array. I load the image using: const imageFile = await Deno.readFile('./path/to/...
Mqx's user avatar
  • 401
0 votes
0 answers
414 views

I am trying to create a uint8_t array and try to change the first element of the array, then print it to the terminal as a string. But, after I assign currBlock (changed block) to arr[0], cout gives ...
sayonara's user avatar
0 votes
1 answer
643 views

sample.json is a file containing a list of values from 0 to 100 under a header called "readings": [ { "id": 105399, "time": "2022-11-22 01:25:23....
ianjms's user avatar
  • 9
1 vote
0 answers
250 views

I am creation a keypair using sr25519PairFromSeed. I am converting the public key from Uint8Array to hex using encodeAddress(publicKey, 0), but i have issues converting the secret key from Uint8array ...
Dario Tsvetanoff's user avatar
1 vote
0 answers
150 views

We have some data we're reading with code like: const readData = fs.readFileSync('./dummy') And readData then looks like below, with a byteOffset of 4664 We then need to make a buffer from that ...
Slbox's user avatar
  • 13.4k
1 vote
2 answers
81 views

Code: var options = { squareShema: [8,8], pixels: new Uint8Array(8 * 8 * 4) }; options.pixels.fill(122); var I = 0, localCounter = 0; // options.pixels.fill(I ,funny, funny+1); for (...
Nikola Lukic's user avatar
  • 4,274
0 votes
0 answers
697 views

Is there a way to get the characteristic.value in onCharacteristicChanged as a byteArray of size 64 in binary? I successfully subscribe to a notify-characteristic of a BLE Service (in Android/Kotlin). ...
Selphiron's user avatar
  • 949
3 votes
1 answer
2k views

Hello I'm sending/POST a File from a HTML Form on a browser client to a Remix application server. The Remix applicaton server is sending/handling my File as a async AsyncIterable. I now need to ...
Bobby's user avatar
  • 323
1 vote
1 answer
748 views

new Uint8Array([1,2,3]).map((v,y)=>"0"+v+"0"+y) > Uint8Array(3) [ 100, 201, 46 ] // actual > ["0100","0201","0302"] // expected new ...
BogdanBiv's user avatar
  • 1,540
0 votes
1 answer
693 views

This question is about converting a gzip deflate message from a websocket message and convert it to array OR raw text that I can apply JSON.parse on it... *** to be also clear: In this question : i ...
John R's user avatar
  • 377
0 votes
1 answer
412 views

I have a CAR file object in javascript and want to read it using js-car github. But I keep getting unexpected end of the file error. Here is my code I am trying let arrayBuffer = await files[0]....
Majid Hojati's user avatar
  • 1,820
6 votes
4 answers
8k views

I have a Javascript integer (whose precision can go up to 2^53 - 1), and I am trying to send it over the wire using an ArrayBuffer. I suppose I could use BigInt64Array, but the browser support still ...
Ryan Peschel's user avatar
0 votes
1 answer
9k views

My code implementation is the following extension of the Uint8Array class. export class ByteArray extends Uint8Array { ... private _encoded: string; ... constructor(_encoded: string)...
ThatAnonyG's user avatar
1 vote
1 answer
881 views

I'm saving numpy arrays while trying to use as little disk space as possible. Along the way I realized that saving a boolean numpy array does not improve disk usage compared to a uint8 array. Is there ...
Zeg du Toit's user avatar
2 votes
1 answer
7k views

It has been a real big issue finding solution to the error on Solana Transaction API I have sent several messages to the tech discord group and the Telegram group and still did not find any of the ...
Dan George's user avatar
1 vote
2 answers
2k views

This is a ROS2 beginner question I've tried to use several ROS sources which suggested me to include "std_msgs/Int8MultiArray.h". However, if I do that I will get an error that is fatal ...
Linz's user avatar
  • 11
2 votes
1 answer
1k views

I'm trying to deserialize a byte array which I believe is a Uint8 array from Godot into a javascript object in a node process. My current implementation is : const message = Buffer.from(buffer.data, '...
Justin Walters's user avatar