Skip to main content

All Questions

Tagged with
0 votes
1 answer
295 views

Why endianness mismatch happens in this code?

Here is simple piece of code from this fiddle: https://jsfiddle.net/vo0aL8h4/2/ It is about a binary endianness issue while making a cross-browser binary data reader/writer code. I was wrong here as ...
Kote Isaev's user avatar
1 vote
0 answers
693 views

How to display the binary data of png image in browser

I got binary data of the png image from some third party api. This is the raw data that I copied after console log the result : `�PNG IHDRf�:%PLTE���U��~IDATx�옱�� D[��I�BfBʌP�R_��ݗ~}�,��8���D��3x뭷��&...
Trung Do Xuan's user avatar
0 votes
0 answers
170 views

Struggling with LSB and MSB in javascript

Normally the specification of a format explains how to binary data must be read. Many times it is just Little Endian or Big Endian. This is quite simple because, at least Javascript, allows to read ...
user avatar
0 votes
1 answer
721 views

Convert Binary PDF Stream, to base64 (server side)

As the title says , i am looking for a way to convert Binary Stream PDF data to Base64 on the server side. The concept is that i am doing a https request to a service and it returns me a binary ...
Theodore Kkbs's user avatar
0 votes
0 answers
579 views

Cannot fetch image as binary

I am confused by strange behavior of fetch on mobile devices, ios or android - doesn't matter. My goal is to load an image by its url via fetch and then represent the loaded data (a jpeg image, for ...
curveball's user avatar
  • 4,505
-1 votes
1 answer
1k views

store binary data of media(image/video) received from whatsapp cloud API

i have to store binary data of which i received from whatsapp cloud api. i am using node js but unable to send the file data using form data here is reference i have referred https://developers....
abhishek mehta's user avatar
-1 votes
2 answers
483 views

How to play audio from an API response?

I'm not able to play audio from the below response. How can I convert that below response and play it. getAudio = async () => { try { const url = `example`; const r = await fetch(url).then(r => ...
Vivek S's user avatar
  • 325
0 votes
1 answer
37 views

How to find the union of two Int16Arrays in JavaScript

I have two Int16Arrays: const a = new Int16Array([ 0, 0, 0, 1 ]) const b = new Int16Array([ 1, 0, 0, 0 ]) I need to find a way to unify these two arrays, so that I receive an output like so: ...
shaneB's user avatar
  • 49
1 vote
1 answer
272 views

Detecting image change by its binary size only

The binary size of an image file is affected by changing a single pixel. I'm curious if comparing the binary sizes of two photos is enough to detect a change! Will there be any false-positive outcomes?...
cyrus-d's user avatar
  • 843
6 votes
1 answer
759 views

When I open a Salesforce Attachment it is downloaded but the pdf is empty

I am getting the attachment body using the Rest API. var config = { method: 'get', url: '<Domanin>/services/data/v48.0/sobjects/Attachment/00PD000000HQD68MAH/Body'...
Chris Blesson's user avatar
0 votes
1 answer
2k views

How to read binary data response from AWS when doing a GET directly to an S3 URI in browser?

Some general context: This is an app that uses the MERN stack, but the question is more specific to AWS S3 data. I have an S3 set up and i store images and files from my app there. I usually generate ...
xunux's user avatar
  • 1,779
3 votes
1 answer
13k views

How do I convert a data buffer in JavaScript into a file?

I am receiving a data buffer from an node/express endpoint on my client side and I want to convert the buffer into a file. The file may be a pdf, text document, or image. The only information the ...
StackMatch's user avatar
2 votes
0 answers
526 views

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'); ...
Tùng Sơn's user avatar
1 vote
1 answer
87 views

How this function should be properly ported from PHP to Javascript

I am working on a project where I need an encoding that I can only get from a PHP project: public static function writeVarLong(int $v) : string{ return self::writeUnsignedVarLong(($v << 1) ^ ...
HerryYT's user avatar
  • 19
-3 votes
1 answer
48 views

stuck on decoding a variable [closed]

I'm gonna get bunch of down votes for this but I don't know anything about binary and I came across something that I need to decode it, here: tst; tst = 501511502 << 64; tst |= 485000121 <&...
Adrin's user avatar
  • 615

15 30 50 per page
1
2 3 4 5
7