403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/gzip_util.cpython-310.pyc
o

;jn�@sbdZddlZddlZddlZGdd�dej�Zddd�Zdd	d
�Zddd�Zd
d�Z	ddd�Z
dS)zp
    salt.utils.gzip
    ~~~~~~~~~~~~~~~
    Helper module for handling gzip consistently between 2.7+ and 2.6-
�Nc@s&eZdZd	dd�Zdd�Zdd�ZdS)
�GzipFileN�	cCstj�|||||�dS)N)�gzipr�__init__)�self�filename�mode�
compresslevel�fileobj�r�H/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gzip_util.pyrszGzipFile.__init__cCs|S)z+Context management protocol.  Returns self.r)rrrr�	__enter__szGzipFile.__enter__cGs|��dS)z+Context management protocol.  Calls close()N)�close)r�argsrrr�__exit__szGzipFile.__exit__)NNrN)�__name__�
__module__�__qualname__rr
rrrrrr
s
r�rbrcCs&ttjd�r
t�|||�St|||�S)Nr
)�hasattrrr�open)rrr	rrrrsrcCs.ttjd�rtjd|||d�Std|||d�S)Nr
�)rrr
r	)rrr)r
rr	rrr�open_fileobj"s��rcCs^t��}t|d|��}t|t�s|�t�}|�|�Wd�n1s$wY|��}|S)z@
    Returns the data compressed at gzip level compression.
    �wbN)	�io�BytesIOr�
isinstance�bytes�encodeZ__salt_system_encoding__�write�getvalue)�datar	�buf�ogz�
compressedrrr�compress,s

�r%cCsDt�|�}t|d��}|��}|Wd�S1swYdS)Nr)rrr�read)r!r"ZigzZuncrrr�
uncompress9s

$�r'�ccs�zt|�}||krt�Wntytd��wz^||kret��}t|d|��,}z
|�|�|��}WntyLtj	j
�|d�}|�|�|��}YnwWd�n1sWwY|��V||ksWz|�
�WdStywYdSwz|�
�Wwty�Yww)a�
    Generator that reads chunk_size bytes at a time from a file/filehandle and
    yields the compressed result of each read.

    .. note::
        Each chunk is compressed separately. They cannot be stitched together
        to form a compressed file. This function is designed to break up a file
        into compressed chunks for transport and decompression/reassembly on a
        remote host.
    zchunk_size must be an integerrrN)�int�
ValueErrorrrrrr&�AttributeError�salt�utils�filesZfopenr r)Zfh_r	Z
chunk_sizeZ
bytes_readr"r#rrr�
compress_file@sD������
�����r/)rr)r)rr()�__doc__rrZsalt.utils.filesr,rrrr%r'r/rrrr�<module>s






Youez - 2016 - github.com/yon3zu
LinuXploit