nodejs字元與位元組之間的轉換

王磊的部落格發表於2015-10-21
new Buffer("Hello World").toString("base64");  
/* yields SGVsbG8gV29ybGQNCg== */


new Buffer("SGVsbG8gV29ybGQNCg==").toString("ascii");  
/* yields Hello World */

 

相關文章