resize

fun resize(newByteLength: Int)(source)

Resizes the ArrayBuffer to the specified size (in bytes).

MDN