1、arrayBufferToBase64 function arrayBufferToBase64( ab:ArrayBuffer):string {return buffer.from(ab).toString('base64'); } 2、base64ToArrayBuffer function base64ToArrayBuffer(base64: string): ArrayBuffer {const buffers = buffer.from(base64, 'base64');return buffers.buffer; }