ArrayBuffer is a Javascript data type used to represent a generic, fixed-length binary data buffer.
Questions tagged [arraybuffer]
597 questions
2
votes
1 answer
Blob to Uint8Array without callback
Is it possible to convert a Blob to Uint8Array without using a callback and just using JavaScript?
How to return the uint8array for the calling variable uint8data?
let str='content';
str2blob=(str,type='text/plain')=>new…

Spiderpoison
- 95
- 2
- 9
2
votes
1 answer
Read zip file from URL to ArrayBuffer with Javascript
I have a front end javascript library into which I'm attempting to load a zip file. The libraries documentation suggests that if I wish to be loading a zip file from a URL (I do) then I need to have the data in an arraybuffer.
As I'm not a…

anakaine
- 1,188
- 2
- 14
- 30
2
votes
0 answers
axios get request to retreive image blob from MySQL DB
I loaded a 56kb image to a table in a MySQL Db via PHP myAdmin. The value says "[BLOB-56.2 KiB]. I am trying to retrieve this image from my node.js backend and display it on my React.js front end. I can retrieve it as a buffer but I am unsure how to…

Justin O
- 67
- 1
- 11
2
votes
1 answer
How can I properly add these two simulated General Purpose Registers in JavaScript?
In JavaScript, for some research I'm trying to simulate the process of following some x86-64 Assembly instructions from scratch. The first step is to properly initiate and be able to perform basic math with any two registers as operators. Since each…

J.Todd
- 707
- 1
- 12
- 34
2
votes
0 answers
How to receive Binary Message from Websocket Reactjs
This is what i want
But this is what i get:
Here is my code:
function App() {
const greeting = 'Hello Function Component!';
const socket = new WebSocket('ws://192.168.99.9/video');
socket.binaryType = 'arraybuffer';
socket.onopen…

Tùng Sơn
- 65
- 1
- 1
- 3
2
votes
1 answer
NodeJS: View and download a PDF from array buffer
My issue:
I already have a solution where I can view a pdf file from an array buffer like so:
const data = getArrayBufferFromAPI() //

Nikhil Nanjappa
- 6,454
- 3
- 28
- 44
2
votes
1 answer
How to only accept ArrayBuffer as parameter
I have a class which accepts an array buffer parameter in the constructor like this:
class Test {
public constructor(buffer: ArrayBuffer) {
...
}
}
Problem is the ArrayBuffer type is a pretty small interface which also accidentally…

kayahr
- 20,913
- 29
- 99
- 147
2
votes
1 answer
Should I care about big-endian machines while using Uint32Array
Should I care about big-endian machines while using Uint32Array and other TypedArrays that represent more than 1 byte array?
Are there devices with big-endian architecture that can correctly open modern sites that use ArrayBuffer API? How much?
All…

KeyKi
- 2,693
- 3
- 12
- 24
2
votes
1 answer
Passing a base64 image string to a Firebase callable cloud function that calls the Cloud Vision API
I'm implementing a web app the uses the Cloud Vision API to detect text on user-generated images.
I'm using React and Firebase cloud functions.
The flow is the following:
User gets image from Gallery or Camera, crops it using react-image-crop…

cbdeveloper
- 27,898
- 37
- 155
- 336
2
votes
1 answer
Load a file into javascript and read first line
I have a 1GB file that I would like to load into a javascript buffer and then read the first line of it. I wasn't sure what the correct 'type' to use for this would be. For example, here is the pseudocode I have:
file = new…

samuelbrody1249
- 4,379
- 1
- 15
- 58
2
votes
0 answers
Convert arraybuffer to fiileList?
I am getting a response of arraybuffer from API for attached PDF documents,I want to preview the pdf document in edit mode and send the same pdf as FileList(like how get file list object when we upload using ). I have managed to convert the array…

Vishnu Shenoy
- 862
- 5
- 18
2
votes
1 answer
upload big file to server by javascript
What is the best way for upload any type of Gigabyte File (such as: video,audio,image,document) to php server when using javascript and ajax?
send file as chunked blob?
Or first convert blob to ArrayBuffer then send to php?
how to merg file in…

user3754884
- 87
- 11
2
votes
1 answer
How can I use Axios to get an array of files to give to Pizzip to generate a .zip archive?
Here's the documentation for Pizzip for those unfamiliar: https://github.com/open-xml-templating/pizzip/tree/master/documentation
Also, I'm using VueJS (2), ES6, TS
I am trying to download individual files with Axios and then put them into a zip…

Monica
- 1,585
- 3
- 23
- 34
2
votes
1 answer
How to tell docx.js to use an image's natural height and width?
I'm getting an image's binary data as an ArrayBuffer, and inserting it into a document using docx.js:
getImageBinaryDataAsArrayBuffer().then(function (imageBuffer) {
var doc = new docx.Document();
var image = docx.Media.addImage(doc,…

Dylan Cristy
- 916
- 11
- 29
2
votes
1 answer
Emscripten: How to get a char array in c from javascript
I am new to Emscripten/javascript, so I apologize in advance, if my situation has already been addressed. I have an app in ionic3 and I want to read an array in c that have 3 positions, and this positions have other array, declared on a…

Jorge GH
- 21
- 3