The most effective way:
const stream = require('stream');
// The buffer
let buffer = Buffer.from("Hello world!", "utf-8");
// The stream from buffer
let bufferStream = new stream.PassThrough();
bufferStream.end(obj.Body)
The most effective way:
const stream = require('stream');
// The buffer
let buffer = Buffer.from("Hello world!", "utf-8");
// The stream from buffer
let bufferStream = new stream.PassThrough();
bufferStream.end(obj.Body)