function copy(src, dst, off = 0) {
  off = Math.max(0, Math.min(off, dst.byteLength));
  const dstBytesAvailable = dst.byteLength - off;
  if (src.byteLength > dstBytesAvailable) {
    src = src.subarray(0, dstBytesAvailable);
  }
  dst.set(src, off);
  return src.byteLength;
}
/**
 * Copy bytes from one Uint8Array to another.  Bytes from `src` which don't fit
 * into `dst` will not be copied.
 *
 * @param src Source byte array
 * @param dst Destination byte array
 * @param off Offset into `dst` at which to begin writing values from `src`.
 * @return number of bytes copied
 */
Copy bytes from one Uint8Array to another.  Bytes from `src` which don't fit
into `dst` will not be copied.

@param src Source byte array
@param dst Destination byte array
@param off Offset into `dst` at which to begin writing values from `src`.
@return number of bytes copied
Copy bytes from one Uint8Array to another . Bytes from ` src ` which don ' t fit into ` dst ` will not be copied . @param src Source byte array @param dst Destination byte array @param off Offset into ` dst ` at which to begin writing values from ` src ` . @return number of bytes copied
function copy(src, dst, off = 0) {
  off = Math.max(0, Math.min(off, dst.byteLength));
  const dstBytesAvailable = dst.byteLength - off;
  if (src.byteLength > dstBytesAvailable) {
    src = src.subarray(0, dstBytesAvailable);
  }
  dst.set(src, off);
  return src.byteLength;
}
function copy ( src , dst , off = 0 ) { off = Math . max ( 0 , Math . min ( off , dst . byteLength ) ) ; const dstBytesAvailable = dst . byteLength - off ; if ( src . byteLength > dstBytesAvailable ) { src = src . subarray ( 0 , dstBytesAvailable ) ; } dst . set ( src , off ) ; return src . byteLength ; }
Copy bytes from one Uint8Array to another.
Copy bytes from one Uint8Array to another .