js arraybuffer转string 潮涨潮落 2022-04-07 1,819 阅读1分钟 ab2str(buf) { const bytes = new Uint8Array(buf) let text = '' for (let i = 0; i < bytes.length; i++) { text += '%' + bytes[i].toString(16) } return decodeURIComponent(text) },