ArrayBuffer is a Javascript data type used to represent a generic, fixed-length binary data buffer.
Questions tagged [arraybuffer]
597 questions
3
votes
2 answers
Enable SharedArrayBuffer on localhost
I keep getting a 'SharedArrayBuffer is not defined' error when trying to run ffmpeg.wasm. It appears this is on the Webassembly side. Regardless, I know this is an issue that can be overcome with Cross Origin Isolation. However, I'm trying to run it…

SnakeBearLB
- 49
- 1
- 3
3
votes
1 answer
Fetching Encrypted Buffer Data to use as ArrayBuffer for client-side decryption
I am attempting to fetch encrypted raw buffer data (AES-256) from Arweave, pass to a decrypt function and use this to display an image. I am trying to fetch and decrypt the ArrayBuffer on the front end (in my React app).
First, I am encrypting the…

anonymoususer8893
- 113
- 10
3
votes
1 answer
axios response.blob is not a function
I am trying to pass a blob with the type of "image/jpeg" from nodeJS to react. In the nodejs end, I pass the data using arraybuffer and on the react end, I try to retrieve it using res.blob which should usually convert the data back. The thing is…

Raja Shilan
- 43
- 1
- 7
3
votes
0 answers
Jquery Ajax call fail with dataType 'binary' because responseType value is arraybuffer and not text
I have to perform a jquery ajax call to download a file. The url refers to a controller method that returns a HttpResponseMessage, and there's not a single problem on this side (StatusCode 200, file bytes, everything seems fine).
Here is the ajax…

Alvard
- 91
- 1
- 8
3
votes
0 answers
FileReader: DOMException, Unable to convert blob to arrayBuffer again and again
I am using fileReader to convert a blob object into arrayBuffer in javascript/React.
then convert the array buffer into blob using
blob = new Blob([arrayBuffer]);
But Now, when I again read the arrayBuffer from last created Blob,
I am getting…

Sanskar Dahiya
- 46
- 1
3
votes
1 answer
How can convert a arraybuffer response type to string in python?
I have API server where response to any requests with arraybuffer format.
This API web server Works properly in Java script as shown as:
xhrOverride.responseType = 'arraybuffer';
request = $.ajax({
url: url,
method: 'GET'
.
.
…

henrry
- 486
- 6
- 25
3
votes
0 answers
Cant send data over RTC data channel using simple peer
I recently tried implementing p2p file transfer using Webrtc by splitting large files into array buffers and then sending them over the data channel. The code was working a month ago, but now it is suddenly throwing me this error.
Uncaught RTCError:…

Dev
- 103
- 1
- 7
3
votes
0 answers
How to convert ArrayBuffer to blob so it can be converted to URL for video playback
I'm trying to create a React.js app that can record short video clips, store them in MongoDB, then retrieve those clips from Mongo at another time and playback for the user. I'm able to record video using the react-video-recorder which returns a…

Omar Haqqani
- 41
- 1
- 3
3
votes
1 answer
web crypto api - how to export key pair?
This is what I've got so far to export a public and private key from a keypair:
let pub = await crypto.subtle.exportKey("spki", keyPair.publicKey);
let prv = await crypto.subtle.exportKey("spki", keyPair.privateKey);
This results in two individual…

David Callanan
- 5,601
- 7
- 63
- 105
3
votes
0 answers
Trying to read Response object into arrayBuffer gives error Failed To Fetch
I am trying to read a really large file, about 6gb in size, into an arraybuffer using the Response object. Here is my code
function handleFileChange(e) {
const file = e.target.files[0];
new Response(file).arrayBuffer().then(data =>…

Chaim Friedman
- 6,124
- 4
- 33
- 61
3
votes
1 answer
Uint8Array invalid typed array length for larger array buffer
I'm reading a file as an array buffer via:
reader.readAsArrayBuffer(myFile);
I'm then taking that array buffer and trying to create a Uint8Array via:
reader.onload = e => {
let arrayBuffer = new Uint8Array(e.target.result, 0,
…

Goblaz
- 53
- 1
- 8
3
votes
1 answer
SubtleCrypto ArrayBuffer Key to String
I've been looking at SublteCrypto to encrypt/decrypt text messages, and wanted to extract the key that is used to String, but using the same interface "SubtleCrypto" produces weird Strings for the key.
Now this is the code that I was playing with:
…

Ahmed
- 49
- 2
- 9
3
votes
2 answers
Why is Blob of Array smaller than Blob of Uint8Array?
I read a file using FileReader.readAsArrayBuffer and then do something like this:
var compressedData = pako.gzip(new Uint8Array(this.result));
var blob1 = new Blob([compressedData]); // size = 1455338 bytes
var blob2 = new…

kodu
- 2,176
- 3
- 17
- 22
3
votes
1 answer
Fastest way to perform XOR using Javascript ArrayBuffer
I have a class representing bits and it uses ArrayBuffers to store the
binary data. I'm trying to figure out if there is a faster method to perform a xor between two ArrayBuffers.
Note The length of the ArrayBuffers are usually less than 10 bytes.…

EyuelDK
- 3,029
- 2
- 19
- 27
3
votes
2 answers
JavaScript - How to load an audio file into readAsArrayBuffer?
I'm having trouble loading an audio file then putting it into readAsArrayBuffer. I don't want the user to choose a file, I just want it to load one locally like so:
let file = new File('../music/song.mp3');
let reader = new…
user8826104