(Nodejs) Converting form Raw Binary Data to usable Binary Data - Someone please answer me this question !

I've been browsing and searching because of this issue for almost 2 weeks.

But since I was too noob, I couldn't understand properly even if I could be seeing some of answers.

So here I am to request only really small amount of code snippet completed. I am actually desperate for it yet the question is quite simple.

What I'm trying to do is, Converting raw binary data into usable binary data.


As you see in (Picture 1), When you run that code snippet I prepared, You will see the result that showing bunch of diamond-shaped codes appearing. So this is the (Raw Binary Data)


And in (Picture 2) I uploaded, When you run that code snipped which is added only one line of code


from (Picture 1), You see that the result has become showing bunch of squre box shaped codes. Now This is real (usable binary data).

The purpose is really really simple. Converting this (Raw Binary Data) into (Usable Binary Data). just as this one line of code SetEncoding('binary'); does.

the outcome in 1) is unusable. It can not be converted into base64, and even it does it dosent show any images.

while 2) really come up with perfect working data set (Usable Binary Data)

Problem is, I can not apply this one line of code [SetEncoding('binary'); ] anytime I want. in CMD command it gets returning 'SetEncoding is not function' error message. Which means I can apply this one only in this specific format.

So what I'm eventually looking for is perfect alternative of "SetEncoding" Code that can be working exactly same as "SetEncoding" did. showing the result of Squire box shaped binary data as result.

So far I've tried really many many methods by myself. They all got failed. whether it's because my lack of knowledge in Nodejs or its terms.

Now I really need complete form of snippet that it is really working without "SetEncoding"

Please answer for this question and bring the perfect working code snippet. That's all I need and searching for 2 weeks. All other processes of work has been stuck because of this one little problem !

Notes :

1) The outcome variable 'store' seems to be a Stream. Not String. At the end of code line I wish I could earn it in both ways. (String, Stream)

2) 3rd party pakages 'http' and 'https' will be needed.

Conditions :

1) SetEncoding('binary'); should not be used in this code.

2) The code need to be done in certain section in 3) picture.

3) The outcome should be having multiple squre box shaped codes just like (picture 2)

4) If it's possible, please make a snippet that could be working without 3rd party pakages else than 'http' and 'https'

Below is the lines of Codes that I've used in pics. Thank you !


// /* 20190208 questions format.

'use strict';

const https = require('https');

const http = require('http');

[login to view URL]('[login to view URL] ', resp => {

var store = "";

[login to view URL]('data', function(d) {

store += d;


// Setencoding('binary');

[login to view URL]('end', function() {



// */

Skills: Java, JavaScript, node.js, Software Architecture, Web Hosting

See more: electron js alternatives, electron vs browser, electron criticism, electron js advantages, electron server, electron js review, electron without node, node js desktop app tutorial, converting form design, scripts answer question, write proportion represent situation solve proportion answer question, randomly choose answer question jsp, php multiple wrong answers right answer question, best converting form page ppc, script answer question aspnet yahoo, converting form cdonts cdosys, much time answer question idrivesafelycom, need someone answer call, need someone answer calls, joomla answer question

About the Employer:
( 0 reviews ) Incheon, Korea, Republic of

Project ID: #18688946

Awarded to:


Currently working on nodejs

$25 USD in 1 day
(0 Reviews)