def decode_file_size(high: int, low: int) -> int:
    """File size can be encoded as 64 bits or 32 bits values.
    If upper 32 bits are set, it's a 64 bits integer value.
    Otherwise it's a 32 bits value. 0xFFFFFFFF means zero.
    """
    if high != 0xFFFFFFFF:
        return (high << 32) | (low & 0xFFFFFFFF)
    elif low != 0xFFFFFFFF:
        return low
    else:
        return 0