File: //usr/local/lib/python3.10/dist-packages/zstandard/__pycache__/backend_cffi.cpython-310.pyc
o
���g�S � @ s� d Z ddlmZmZ g d�ZddlZddlZddlmZm Z e
� Ze �� Z
e �� Ze �� Ze �� Zejdd�Ze �� Ze jZd Ze jZe jZe je j e j!fZ"e j#Z$e j%Z&e j'Z(e j)Z*e j+Z,e j-Z.e j/Z0e j1Z2e j3Z4e j5Z6e j7Z8e j9Z:e j3Z;e j5Z<e j=Z>e j?Z@e jAZBe jCZDe jEZFe jGZHe jIZJe jKZLe jMZNe jOZPe jQZRe jSZTe jUZVe jWZXe jYZZe j[Z\e j]Z^e j_Z`e jaZbdZcdZddZedZfd
d� ZgG dd
� d
�ZhG dd� d�ZiG dd� d�ZjG dd� d�ZkG dd� del�Zmdd� Zndd� ZoG dd� dep�Zqdd� Zrdd� Zsd d!� ZtG d"d#� d#ep�ZuG d$d%� d%ep�ZvG d&d'� d'ep�ZwG d(d)� d)ep�ZxG d*d+� d+ep�ZyG d,d-� d-ep�Zzd.d/� Z{d0d1� Z|d2d3� Z}G d4d5� d5ep�Z~ 6 dAd7d8�ZG d9d:� d:ep�Z�G d;d<� d<ep�Z�G d=d>� d>ep�Z�G d?d@� d@ep�Z�dS )Bz=Python interface to the Zstandard (zstd) compression library.� )�absolute_import�unicode_literals)F�
BufferSegment�BufferSegments�BufferWithSegments�BufferWithSegmentsCollection�ZstdCompressionChunker�ZstdCompressionDict�ZstdCompressionObj�ZstdCompressionParameters�ZstdCompressionReader�ZstdCompressionWriter�ZstdCompressor�ZstdDecompressionObj�ZstdDecompressionReader�ZstdDecompressionWriter�ZstdDecompressor� ZstdError�FrameParameters�backend_features�#estimate_decompression_context_size�frame_content_size�frame_header_size�get_frame_parameters�train_dictionary�FLUSH_BLOCK�FLUSH_FRAME�COMPRESSOBJ_FLUSH_FINISH�COMPRESSOBJ_FLUSH_BLOCK�ZSTD_VERSION�FRAME_HEADER�CONTENTSIZE_UNKNOWN�CONTENTSIZE_ERROR�MAX_COMPRESSION_LEVEL�"COMPRESSION_RECOMMENDED_INPUT_SIZE�#COMPRESSION_RECOMMENDED_OUTPUT_SIZE�$DECOMPRESSION_RECOMMENDED_INPUT_SIZE�%DECOMPRESSION_RECOMMENDED_OUTPUT_SIZE�MAGIC_NUMBER�BLOCKSIZELOG_MAX�
BLOCKSIZE_MAX�
WINDOWLOG_MIN�
WINDOWLOG_MAX�CHAINLOG_MIN�CHAINLOG_MAX�HASHLOG_MIN�HASHLOG_MAX�MINMATCH_MIN�MINMATCH_MAX�
SEARCHLOG_MIN�
SEARCHLOG_MAX�SEARCHLENGTH_MIN�SEARCHLENGTH_MAX�TARGETLENGTH_MIN�TARGETLENGTH_MAX�LDM_MINMATCH_MIN�LDM_MINMATCH_MAX�LDM_BUCKETSIZELOG_MAX�
STRATEGY_FAST�STRATEGY_DFAST�STRATEGY_GREEDY�
STRATEGY_LAZY�STRATEGY_LAZY2�STRATEGY_BTLAZY2�STRATEGY_BTOPT�STRATEGY_BTULTRA�STRATEGY_BTULTRA2�DICT_TYPE_AUTO�DICT_TYPE_RAWCONTENT�DICT_TYPE_FULLDICT�FORMAT_ZSTD1�FORMAT_ZSTD1_MAGICLESSN� )�ffi�libF)�should_clear_after_allocs (�/�c C sH zt �� pdW S ty Y nw zt �d�W S ttfy# Y dS w )Nr �SC_NPROCESSORS_ONLN)�os� cpu_count�AttributeError�sysconf�
ValueError� rT rT �A/usr/local/lib/python3.10/dist-packages/zstandard/backend_cffi.py�
_cpu_count� s ��rV c @ s, e Zd ZdZedd� �Zdd� Zdd� ZdS ) r z�Represents a segment within a ``BufferWithSegments``.
This type is essentially a reference to N bytes within a
``BufferWithSegments``.
The object conforms to the buffer protocol.
c C � t � �)z9The byte offset of this segment within its parent buffer.��NotImplementedError��selfrT rT rU �offset� � zBufferSegment.offsetc C rW )z+Obtain the length of the segment, in bytes.rX rZ rT rT rU �__len__� � zBufferSegment.__len__c C rW )z"Obtain bytes copy of this segment.rX rZ rT rT rU �tobytes� r_ zBufferSegment.tobytesN)�__name__�
__module__�__qualname__�__doc__�propertyr\ r^ r` rT rT rT rU r � s
r c @ s e Zd ZdZdS )r a Represents an array of ``(offset, length)`` integers.
This type is effectively an index used by :py:class:`BufferWithSegments`.
The array members are 64-bit unsigned integers using host/native bit order.
Instances conform to the buffer protocol.
N)ra rb rc rd rT rT rT rU r � s r c @ s<