The Uint8Array typed array represents an array of 8-bit unsigned integers.
Questions tagged [uint8array]
162 questions
1
vote
0 answers
Anycable Websocket disconnects automatically while sending binary data
I have an AnyCable/Actioncable running on a Rails 6 server, when trying to send binary (uint8Array) data over the websocket from browser to server the websocket connection will disconnect and reconnect automatically without any error (on both client…

dashb
- 119
- 9
1
vote
3 answers
Round Image File
I did this code to get an image from firestore and use it as an icon for a Map Marker.
final StorageReference storageReference =
FirebaseStorage().ref().child("ProfilePictures/" + widget.userId);
String avatarDownloadPath = await…

Milvintsiss
- 1,420
- 1
- 18
- 34
1
vote
2 answers
How to store character code in a JavaScript Uint8Array?
In the function toCharArr the argument arr is an "array of characters"
{ Example: arr = ['H','e','l','l','o'] }
function toCharArr(arr) {
const res = new Uint8Array(arr.length);
for (let i=0; i < arr.length; i++)
res[i] = arr[i];
…

sp497
- 2,363
- 7
- 25
- 43
1
vote
1 answer
Why do TypedArrays have a static length property with value 3
I just came across this gem when looking up some Uint8Array properties:
TypedArray.length
Length property whose value is 3.
I tried it and it is true!
What? Why does this exist?!

Timmmm
- 88,195
- 71
- 364
- 509
1
vote
1 answer
Flutter consolidateHttpClientResponseBytes not defined error?
I'm trying to parse a url image in order to turn it into Uint8 bytes and share across my share provider. When trying to consolidate my http response into bytes I get the following error The method 'consolidateHttpClientResponseBytes' isn't defined…

Charles Jr
- 8,333
- 15
- 53
- 74
1
vote
2 answers
Change value of variable in Sources --> Scope --> Local in ChromeDevTools-GUI
I'm completly new to ChromeDev-Tools so maybe I just oversee something.
This is a Screenshot of the value I want to change in a javascript when it reaches my breakpoint.
I need to read the value in Screenshot and change it. Is there a way to do…

Fox Stinson
- 11
- 1
1
vote
1 answer
How to handle the endianness with UInt8 in a DataView?
It seems like there is nothing to handle endianness when working with UInt8. For example, when dealing with UInt16, you can set if you want little or big endian:
dataview.setUint16(byteOffset, value [,…

Maxime Dupré
- 5,319
- 7
- 38
- 72
1
vote
1 answer
Typescript get Int8Array from ArrayBuffer
I'm reading a file as ArrayBuffer with this code:
var reader: FileReader = new FileReader();
reader.readAsArrayBuffer(file);
reader.onloadend = function (e) {
var fileContent = reader.result;
...
}
I need to get the content as byte…

bigskull
- 541
- 2
- 18
- 28
1
vote
0 answers
How to convert Uint8Array with byteOffset to Arraybuffer for HttpClient.post
How can I efficiently (no copy, only wrappers) convert a Uint8Array (payload) with a non-zero byteOffset
to a ArrayBuffer such that it can be sent binary-style with the Angular HttpClient.post method?
public post(requestUrl: string, payload:…

Gabriel
- 8,990
- 6
- 57
- 101
1
vote
2 answers
how to convert double data to uint8 array and again return to double
I want to get data as a double so after that i send the data as uint8_t array. So I determined 2 steps.Steps;
1-First Step :Double to uint8_t
#include
#include
#include
void float2Bytes(double val,uint8_t*…

Yavuzhan Erdem
- 23
- 3
- 9
1
vote
1 answer
What is the best way to modify a [UInt8] byte array in swift 4?
Hi I know many of you already know how it can be done but please help me as I'm a beginner to swift programming.
Please consider this code and help me with changes,
//My read code
let ReceiveData = rxCharacteristic?.value
if let ReceiveData…

nar0909
- 135
- 2
- 14
1
vote
1 answer
Convert float values to uint8 array in javascript
I have a Float32Array with values from an audio file.I want to save it as a .wav file so I need to convert that values to a Uint8array.
To convert from uint8 to float I convert first to an int16 array and then to a Float32Array (Convert int16 array…

user7597554
- 95
- 4
- 11
1
vote
2 answers
Convert int16 array to float
I have an array of bytes from an audio file and I want to convert it into data that I can process to filter the audio signal.
I have an array like this:
[239,246,96,247.....]; Each element is a uint8 byte
Each 2 bytes(16 bits) represent a sample,so…

user7597554
- 95
- 4
- 11
1
vote
0 answers
Send carriage return
I'm trying to connect through serial Scratchx and a piece of hardware similar to Arduino.
Scratchx lets you send data in JS this way:
var pingCmd = new Uint8Array(1);
pingCmd[0] = 1;
device.send(pingCmd.buffer);
Problem is the hardware firmware…
user1094081
1
vote
2 answers
swift 3 ios : convert UInt8 Array to int8
i have an UInt8 array that contains values between 0 and 255
i would like to convert this array to Int8 array in order to contains values between -128 and 127
How to achieve this in swift?

Anthony Shahine
- 2,477
- 3
- 18
- 24