HEX
Server: Apache
System: Linux infong-uk86 4.4.400-icpu-106 #2 SMP Mon Sep 15 08:23:40 UTC 2025 x86_64
User: u44115835 (4976590)
PHP: 8.4.17
Disabled: NONE
Upload Files
File: //kunden/lib/python3/dist-packages/breezy/__pycache__/bisect_multi.cpython-39.pyc
a

�*�^�
�@s"dZddlmZdgZdd�ZdS)zBisection lookup multiple keys.�)�absolute_import�bisect_multi_bytesc	s�g}|d��fdd�|D�}|r�||�}�dkr:�d�g}|D]^\\}}}|dkrj|�|�|f�qB|dkr�|�|�|f�qB|dur�qBqB|�||f�qBq|S)a(Perform bisection lookups for keys using byte based addressing.

    The keys are looked up via the content_lookup routine. The content_lookup
    routine gives bisect_multi_bytes information about where to keep looking up
    to find the data for the key, and bisect_multi_bytes feeds this back into
    the lookup function until the search is complete. The search is complete
    when the list of keys which have returned something other than -1 or +1 is
    empty. Keys which are not found are not returned to the caller.

    :param content_lookup: A callable that takes a list of (offset, key) pairs
        and returns a list of result tuples ((offset, key), result). Each
        result can be one of:
          -1: The key comes earlier in the content.
          False: The key is not present in the content.
          +1: The key comes later in the content.
          Any other value: A final result to return to the caller.
    :param size: The length of the content.
    :param keys: The keys to bisect for.
    :return: An iterator of the results.
    �csg|]}�|f�qS�r)�.0�key�Zdeltar�5/usr/lib/python3/dist-packages/breezy/bisect_multi.py�
<listcomp>2�z&bisect_multi_bytes.<locals>.<listcomp>����F)�append)	Zcontent_lookup�size�keys�resultZsearch_keysZsearch_results�locationrZstatusrrr	rs"N)�__doc__Z
__future__r�__all__rrrrr	�<module>s�