Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

decode raw data to string nodejs

The String Decoder module provides a way of decoding Buffer objects into strings.
See example from w3school below:

var StringDecoder = require('string_decoder').StringDecoder;
var d = new StringDecoder('utf8');
var b = Buffer('abc');

console.log(b); //write buffer
console.log(d.write(b)); // write decoded buffer;
Source by nodejs.org #
 
PREVIOUS NEXT
Tagged: #decode #raw #data #string #nodejs
ADD COMMENT
Topic
Name
1+6 =