function getPaddedArrayBuffer( arrayBuffer, paddingByte = 0 ) {

	const paddedLength = getPaddedBufferSize( arrayBuffer.byteLength );

	if ( paddedLength !== arrayBuffer.byteLength ) {

		const array = new Uint8Array( paddedLength );
		array.set( new Uint8Array( arrayBuffer ) );

		if ( paddingByte !== 0 ) {

			for ( let i = arrayBuffer.byteLength; i < paddedLength; i ++ ) {

				array[ i ] = paddingByte;

			}

		}

		return array.buffer;

	}

	return arrayBuffer;

}
Returns a buffer aligned to 4-byte boundary.

@private
@param {ArrayBuffer} arrayBuffer Buffer to pad
@param {number} [paddingByte=0] Should be an integer
@returns {ArrayBuffer} The same buffer if it's already aligned to 4-byte boundary or a new buffer