export function transferableWorkbookBuffer(output: ArrayBuffer | Uint8Array): ArrayBuffer {
  if (output instanceof ArrayBuffer) return output;
  if (output.buffer instanceof ArrayBuffer && output.byteOffset === 0 && output.byteLength === output.buffer.byteLength) {
    return output.buffer;
  }
  return output.slice().buffer as ArrayBuffer;
}
