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__/tuned_gzip.cpython-39.pyc
a

�*�^�@s^dZddlmZddlZddlZdgZdd�Zdd�Zejej	ej
ejejej
fd	d�ZdS)
z$Legacy breezy specific gzip tunings.�)�absolute_importN�chunks_to_gzipcCs|dkr|d7}|S)z�Return i as an unsigned integer, assuming it fits in 32 bits.

    If it's >= 2GB when viewed as a 32-bit unsigned int, return a long.
    rl���irr�3/usr/lib/python3/dist-packages/breezy/tuned_gzip.py�U32srcCs|d@S)z>Return the low-order 32 bits of an int, as a non-negative int.l��rrrrr�LOWU32&sr	c
Cs�dg}|||||d�}d}	d}
|D]2}|||	�}	|
t|�7}
|�|�}|r"|�|�q"|�|���|�t�dt|	�t|
���|S)z�Create a gzip file containing chunks and return its content.

    :param chunks: An iterable of strings. Each string can have arbitrary
        layout.
    s
��rz<LL)�len�compress�append�flush�structZpackr	)
Zchunks�factory�level�method�widthZmem�crc32�resultr�crcZ	total_len�chunkZzbytesrrrr+s
�

)�__doc__Z
__future__rr�zlib�__all__rr	ZcompressobjZZ_DEFAULT_COMPRESSIONZDEFLATEDZ	MAX_WBITSZ
DEF_MEM_LEVELrrrrrr�<module>s

�