def seven_byte_length(value):
    """
    Returns the minimum number of bytes required to represent the integer
    if we can use seven bits per byte.
    Positive integers only, please!
    """
    q, rem = divmod(value.bit_length(), 7)
    if rem or not q:
        # (the not q is in case value is 0, we can't have 0 bytes)
        q += 1
    return q