sliceBufferToImmutable = (
  buffer,
  start = undefined,
  end = undefined,
) => {
  let realBuffer = buffers.get(buffer);
  if (realBuffer === undefined) {
    realBuffer = buffer;
  }
  return makeImmutableArrayBufferInternal(
    arrayBufferSlice(realBuffer, start, end),
  );
}
Creates an immutable slice of the given buffer.
@param {ArrayBuffer} buffer The original buffer.
@param {number} [start] The start index.
@param {number} [end] The end index.
@returns {ArrayBuffer} The sliced immutable ArrayBuffer.