'How to convert application/octet-stream into an image using NodeJS?

i'm writing a test script using Nodejs. the script will in no way run in a browser environment, therefore i cannot use any browser only modules. that being said i have a file which has Base64 encoded application/octet-stream. which i want to convert into an image(Any image format will do). I tried a few online converters but none of them worked. The image itself was so Huge that many of them kept crashing. therefore i have no way to confirm the integrity of the image. it'll be help full if someone can suggest an online image converter which does just this. that being said my end goal is to create an image using this stream and NodeJS. How do i that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source