import { assert } from "../assert.js";

/**
 * Align on 4 byte boundary
 * @param {number} n
 * @return {number}
 */
export function align_4(n) {
    const result = ((n + 0x3) >> 2) << 2;

    assert.greaterThanOrEqual(result, n, 'aligned result must be >= input');

    return result;
}

