| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/site-packages/lz4/frame/__pycache__/ |
Upload File : |
�
�7�h} � �V � d dl Z d dlZd dlZd dlZd dlZddlmZmZmZm Z m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZ eZ d dlZeZ eZ eZ eZ eZ d Z dZ dZ! G d� de"� Z# G d � d
e"� Z$d Z%dZ&dZ' G d� dejP � Z)d
dddededdddd fd�Z*y# e$ r ddlmZ Y �gw xY w)� N� )�compress�
decompress�create_compression_context�compress_begin�compress_chunk�compress_flush�create_decompression_context�reset_decompression_context�decompress_chunk�get_frame_info�BLOCKSIZE_DEFAULT�BLOCKSIZE_MAX64KB�BLOCKSIZE_MAX256KB�BLOCKSIZE_MAX1MB�BLOCKSIZE_MAX4MB�__doc__)�_compression� � c �X � e Zd ZdZededdddfd�Zd� Zd� Zdd�Z d� Z
d � Zd
� Zd� Z
d� Zy
)�LZ4FrameCompressora� Create a LZ4 frame compressor object.
This object can be used to compress data incrementally.
Args:
block_size (int): Specifies the maximum blocksize to use.
Options:
- `lz4.frame.BLOCKSIZE_DEFAULT`: the lz4 library default
- `lz4.frame.BLOCKSIZE_MAX64KB`: 64 kB
- `lz4.frame.BLOCKSIZE_MAX256KB`: 256 kB
- `lz4.frame.BLOCKSIZE_MAX1MB`: 1 MB
- `lz4.frame.BLOCKSIZE_MAX4MB`: 4 MB
If unspecified, will default to `lz4.frame.BLOCKSIZE_DEFAULT` which
is equal to `lz4.frame.BLOCKSIZE_MAX64KB`.
block_linked (bool): Specifies whether to use block-linked
compression. If ``True``, the compression ratio is improved,
especially for small block sizes. If ``False`` the blocks are
compressed independently. The default is ``True``.
compression_level (int): Specifies the level of compression used.
Values between 0-16 are valid, with 0 (default) being the
lowest compression (0-2 are the same value), and 16 the highest.
Values above 16 will be treated as 16.
Values between 4-9 are recommended. 0 is the default.
The following module constants are provided as a convenience:
- `lz4.frame.COMPRESSIONLEVEL_MIN`: Minimum compression (0)
- `lz4.frame.COMPRESSIONLEVEL_MINHC`: Minimum high-compression (3)
- `lz4.frame.COMPRESSIONLEVEL_MAX`: Maximum compression (16)
content_checksum (bool): Specifies whether to enable checksumming of
the payload content. If ``True``, a checksum of the uncompressed
data is stored at the end of the compressed frame which is checked
during decompression. The default is ``False``.
block_checksum (bool): Specifies whether to enable checksumming of
the content of each block. If ``True`` a checksum of the
uncompressed data in each block in the frame is stored at the end
of each block. If present, these checksums will be used to
validate the data during decompression. The default is ``False``,
meaning block checksums are not calculated and stored. This
functionality is only supported if the underlying LZ4 library has
version >= 1.8.0. Attempting to set this value to ``True`` with a
version of LZ4 < 1.8.0 will cause a ``RuntimeError`` to be raised.
auto_flush (bool): When ``False``, the LZ4 library may buffer data
until a block is full. When ``True`` no buffering occurs, and
partially full blocks may be returned. The default is ``False``.
return_bytearray (bool): When ``False`` a ``bytes`` object is returned
from the calls to methods of this class. When ``True`` a
``bytearray`` object will be returned. The default is ``False``.
TFc �� � || _ || _ || _ || _ |r"t j
� dk rt
d� �|| _ || _ || _ d | _
d| _ y )Ni0* zEAttempt to set block_checksum to True with LZ4 libraryversion < 10800F)�
block_size�block_linked�compression_level�content_checksum�lz4�library_version_number�RuntimeError�block_checksum�
auto_flush�return_bytearray�_context�_started)�selfr r r r r! r"