The Uint8Array typed array represents an array of 8-bit unsigned integers.
Questions tagged [uint8array]
162 questions
1
vote
0 answers
Raw data redux store
Implementing a local search algorithm with the CSV received from the server, Then encode the CSV file records in a bit sequence for each record. Now I want to access to the series of bit sequences (about 17000 items) with redux. Implementing this…

Nasser1245
- 37
- 1
- 5
1
vote
1 answer
How to get an array of strings based on Uint8Array values (map Uint8 values to String/s)
new Uint8Array([1,2,3]).map((v,y)=>"0"+v+"0"+y)
> Uint8Array(3) [ 100, 201, 46 ] // actual
> ["0100","0201","0302"] // expected
new Uint8Array([1,2,3]).map((v,y)=>v+1)
> Uint8Array(3) [ 2, 3, 4 ] // actual as expected
[1, 2, 3].map(x => "0"+x);
>…

BogdanBiv
- 1,485
- 1
- 16
- 33
1
vote
1 answer
Uint8Array is not showing correct values for PNG file
I am trying to decode a PNG file coming as an Uint8Array from the backend using javascript in the browser. Slicing the Uint8Array from 15~28 and console.logging the values prints this : [82, 0, 0, 1, 0, 0, 0, 1, 0, 8, 6, 0, 0]. If I sum the bytes…

Lupexlol
- 63
- 7
1
vote
2 answers
How to convert a Javascript number to a Uint8Array?
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 seems relatively new with that.
I cannot use…

Ryan Peschel
- 11,087
- 19
- 74
- 136
1
vote
1 answer
Saving a numpy array in binary does not improve disk usage compared to uint8
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 a reason for that or am I doing something wrong…

Zeg du Toit
- 64
- 6
1
vote
2 answers
ROS2: how to create an Int8MultiArray
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 error: std_msgs/Int8MultiArray: No such file or…

Linz
- 11
- 1
1
vote
1 answer
Byte count mismatch when re-interpreting float32 array as uint8 array
We intend to change the JavaScript representation of an array of float32 values to an array of uint8 bytes. It's implied that doing so might help us more efficiently transfer the data over HTTP requests.
To do so, we have tried:
var vertexBuffer =…

Megidd
- 7,089
- 6
- 65
- 142
1
vote
3 answers
How to convert a hex string to a uint8_t array? (C language)
how can I convert a hex string to a uint8_t array?
My string is 02012B1530A6E3958A98530031902003876940000000000CDF9844173BE512AFFFFFFE11DBBA1F00079387800E13012E11FC017FFFFFFFFE39C10F40
and I want to convert it into this array:
uint8_t array_uint[] =…
user14677223
1
vote
1 answer
Saving an array of uint8array in an file using node js
I'm trying to save an array of uint8arrays in an file using node JS, does anyone know how can I do that using fs?
Something like that:
[
Uint8Array(162) [
133, 111, 74, 131, 187, 35, 69, 135, 1, 151, 1, 1,
198, 69, 229, 121, 168, 106, 59,…

Fbosisio
- 11
- 1
1
vote
1 answer
Converting a Uint8Array into a file I can save in Supabase
I'm creating a Figma plugin that will convert a frame into an image that I want to save into Supabase storage. I successfully exported a Uint8array from Figma and sent it to an API I made using Nextjs hosted on Vercel.
The part I'm struggling with…

Charles de Dreuille
- 303
- 2
- 11
1
vote
1 answer
How do I store an ArrayBuffer in MongoDB?
I'm trying to build an Electron React App that captures short videos of the screen but am unable to store videos (as part of a larger "Payload" object:
{video_buffer: xxx, time_stamp: 3456345 ...}
The videos are created in the renderer process via…

Radespy
- 336
- 2
- 11
1
vote
1 answer
Explanation on Integer to Array
Please Help
I know that you are reading this, and I would appreciate a comment if do not have an answer because I feel that I am alone in trying to figure this out.
How Does this Work?
I have thoroughly read this document. It mentions an element…

quicVO
- 778
- 4
- 13
1
vote
1 answer
What array format to use when sending PDF file in JSON using Node.js
We are developing a Node.js API using Express.js. One of our functions receives some ID. We take that ID and return a pdf file (that is stored on AWS) in a json response that looks something like this:
{
ID: "id10",
pdf: [21, 23, 34, 46,…

Jaka Tertinek
- 48
- 7
1
vote
0 answers
How to get accumulated frequency data from Web Audio API getByteFrequencyData?
I'm actually working on a project with Web Audio API and React, to make audio visualization. One of my goals, is to get the complete (accumulated?) frequency data from my audio file.
Actually I'm using an AudioContext with the…

soykje
- 189
- 2
- 16
1
vote
1 answer
find index of string in Uint8Array
I have a Uint8Array that is actually a content of the PDF file. I'd like to find the index of certain string that is located in that array, so I can insert some content at that position.
To do that I am actually converting the Uint8Array to string,…

user3362334
- 1,980
- 3
- 26
- 58