def byte_align(pos):
    """Return the smallest multiple of 8 greater than ``pos``. Raises
    ``ValueError`` if ``pos`` is negative.
    """
    if pos < 0:
        msg = "Expected positive integer, got {}"
        raise ValueError(msg.format(pos))
    return ((pos + 7) // 8) * 8