Node.js examples for Data Type:Uint8Array
Convert Ascii to Uint8 Array
function asciiToUint8Array(str){ var chars = []; for (var i = 0; i < str.length; ++i){ chars.push(str.charCodeAt(i));/*from w ww. j a v a 2s.c o m*/ } return new Uint8Array(chars); }