403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/breezy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/breezy/__pycache__/chunk_writer.cpython-313.pyc
�

p��gW/��@�SrSSKrSSKJr SSKJrJr "SS5rg)z@ChunkWriter: write compressed data out with a fixed upper bound.�N)�Optional)�Z_FINISH�Z_SYNC_FLUSHc	���\rSrSrSrSrSrSS\S\S\SS	4S
jjr	S\
\\\
\\44SjrSS\SS	4S
jjrSS\
\S\
\\\S44SjjrSS\S\S\4SjjrSrg	)�ChunkWriter�a5ChunkWriter allows writing of compressed data with a fixed size.

If less data is supplied than fills a chunk, the chunk is padded with
NULL bytes. If more data is supplied, then the writer packs as much
in as it can, but never splits any item it was given.

The algorithm for packing is open to improvement! Current it is:
 - write the bytes given
 - if the total seen bytes so far exceeds the chunk size, flush.

:cvar _max_repack: To fit the maximum number of entries into a node, we
    will sometimes start over and compress the whole list to get tighter
    packing. We get diminishing returns after a while, so this limits the
    number of times we will try.
    The default is to try to avoid recompressing entirely, but setting this
    to something like 20 will give maximum compression.

:cvar _max_zsync: Another tunable nob. If _max_repack is set to 0, then you
    can limit the number of times we will try to pack more data into a
    node. This allows us to do a single compression pass, rather than
    trying until we overflow, and then recompressing again.
)r�)�r�
chunk_size�reserved�optimize_for_size�returnNc���Xl[R"5Ul/Ul/UlSUlSUlSUlSUl	SUl
X lURUS9 g)aCreate a ChunkWriter to write chunk_size chunks.

:param chunk_size: The total byte count to emit at the end of the
    chunk.
:param reserved: How many bytes to allow for reserved data. reserved
    data space can only be written to via the write(...,
    reserved=True).
rN)�for_size)
r�zlib�compressobj�
compressor�bytes_in�
bytes_list�
bytes_out_len�unflushed_in_bytes�
num_repack�	num_zsync�unused_bytes�
reserved_size�set_optimize)�selfrrr
s    �5/usr/lib/python3/dist-packages/breezy/chunk_writer.py�__init__�ChunkWriter.__init__bse��%���*�*�,���%'��
�')������"#���������-1���%�����#4��5�c���/UlURR[5nURRU5 U=R[U5-
slURUR:�a%[SURSUR35eURUR-
nU(aURRSU-5 URURU4$)a2Finish the chunk.

This returns the final compressed chunk, and either None, or the
bytes that did not fit in the chunk.

:return: (compressed_bytes, unused_bytes, num_nulls_needed)

    * compressed_bytes: a list of bytes that were output from the
      compressor. If the compressed length was not exactly chunk_size,
      the final string will be a string of all null bytes to pad this
      to chunk_size
    * unused_bytes: None, or the last bytes that were added, which we
      could not fit.
    * num_nulls_needed: How many nulls are padded at the end
z3Somehow we ended up with too much compressed data, z > �)rr�flushrr�appendr�lenr�AssertionErrorr)r�out�nulls_neededs   r�finish�ChunkWriter.finish{s��� ��
��o�o�#�#�H�-�������s�#����c�#�h�&��������/� �%�%)�%7�%7�$8��D�O�O�;L�N��
�����);�);�;����O�O�"�"�7�\�#9�:����� 1� 1�<�?�?r!rc�r�U(a[RnO[RnUuUlUlg)z�Change how we optimize our writes.

:param for_size: If True, optimize for minimum space usage, otherwise
    optimize for fastest writing speed.
:return: None
N)r�_repack_opts_for_size�_repack_opts_for_speed�_max_repack�
_max_zsync)rr�optss   rr�ChunkWriter.set_optimize�s,����4�4�D��5�5�D�,0�)���$�/r!�extra_byteszzlib._Compressc�N�[R"5n/nURnURnURHnU"U5nU(dMU"U5 M U(a'U"U5nXrR[5-
nU"U5 [[[U55nX8U4$)a�Recompress the current bytes_in, and optionally more.

:param extra_bytes: Optional, if supplied we will add it with
    Z_SYNC_FLUSH
:return: (bytes_out, bytes_out_len, alt_compressed)

    * bytes_out: is the compressed bytes returned from the compressor
    * bytes_out_len: the length of the compressed output
    * compressor: An object with everything packed in so far, and
      Z_SYNC_FLUSH called.
)
rrr%�compressrr$r�sum�mapr&)	rr3r�	bytes_outr%r5�accepted_bytesr(rs	         r�_recompress_all_bytes_in�$ChunkWriter._recompress_all_bytes_in�s����%�%�'�
�!#�	��!�!���&�&��"�m�m�N��>�*�C��s��s��,���;�'�C��#�#�L�1�1�C��3�K��C��Y�/�0�
���3�3r!�bytesc���URUR:�aU(dXlgU(a
URnOURUR-
nUR
nUR[U5-nX0R-
S-
nXV:a�URU5nU(a9URRU5 U=R[U5-
slURRU5 U=R[U5-
slgU=RS-
sl
URS:Xa6URUR:�aU=RS-
slXlgURU5nXtR[ 5-
nSUlU(a9URRU5 U=R[U5-
slURS:XaSnOSnURU-U::aURRU5 gU=RS-
slUR#U5up�nURUR:�aU=RS-
slU
S-U:�a@UR#5up�nX�lURS-UlX�l
X�lXlgX�lURRU5 X�l
X�lg)aWrite some bytes to the chunk.

If the bytes fit, False is returned. Otherwise True is returned
and the bytes have not been added to the chunk.

:param bytes: The bytes to include
:param reserved: If True, we can use the space reserved in the
    constructor.
T�
�r�dF)rr/rrrrrr&rr5rr%rrr0r$rr:)rr<r�capacity�comp�next_unflushed�remaining_capacityr(�
safety_marginr8�this_lenrs            r�write�ChunkWriter.write�sp���?�?�T�-�-�-�h� %�������H�����);�);�;�H������0�0�3�u�:�=��%�(:�(:�:�R�?���.��-�-��&�C�����&�&�s�+��"�"�c�#�h�.�"��M�M� � ��'��#�#�s�5�z�1�#�n�]
�N�N�a��N����1�$����$�/�/�)I����1�$��$)�!���-�-��&�C��:�:�l�+�+�C�&'�D�#�����&�&�s�+��"�"�c�#�h�.�"�
���!�#� #�
� "�
��!�!�M�1�X�=��
�
�$�$�U�+�2�+���1�$��48�4Q�4Q�RW�4X�1��j��?�?�d�&6�&6�6��O�O�q�(�O��b�=�8�+�8<�8U�8U�8W�5�Y�*�&0�O�&*�&6�&6��&:�D�O�&/�O�)1�&�(-�%��'1�O��M�M�(�(��/�&/�O�)1�&�r!)r/r0rrrrrrrrrr)rF)T)N)F)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r.r-�int�boolr�tuple�listr<rr*rr:rG�__static_attributes__�r!rrrs����J$��#��MR�6��6�),�6�EI�6�	
�6�2@��d�5�k�8�E�?�C�?�@�@�>1�T�1�T�1�.2�4�#�E�?�4�	�t�E�{�C�!1�1�	2�4�:U�5�U�D�U�T�U�Ur!r)rMr�typingrrrrrSr!r�<module>rUs ��$G���'�@�@r!

Youez - 2016 - github.com/yon3zu
LinuXploit