saad-z
حزمة Python باسم saad_z تعيد تصدير واجهة zstandard تحت اسم جديد:
from saad_z import ZstdDecompressor, ZstdCompressionDict, DICT_TYPE_AUTO
الحزمة نفسها غلاف خفيف، بينما تنفيذ الضغط وفك الضغط يأتي من مشروع zstandard الأصلي. لذلك تحافظ على الأداء والتوافق بدل إعادة تنفيذ محرك Zstandard.
التثبيت
python -m pip install saad-z
يتطلب التثبيت محرك zstandard الثنائي المتوافق مع إصدار Python ونظام التشغيل. على Pydroid 3 أو Android قد لا يتوفر wheel جاهز، وعندها قد يفشل التثبيت ما لم تتوفر أداة بناء مناسبة للامتداد الأصلي.
ضغط وفك ضغط بسيط
from saad_z import ZstdCompressor, ZstdDecompressor
source = b"SAAD compression example " * 100
compressed = ZstdCompressor(level=3).compress(source)
restored = ZstdDecompressor().decompress(compressed)
assert restored == source
print(len(source), len(compressed))
استخدام الأسماء المطلوبة
from saad_z import ZstdDecompressor, ZstdCompressionDict, DICT_TYPE_AUTO
raw_dictionary = b"SAAD dictionary data " * 20
dictionary = ZstdCompressionDict(raw_dictionary, dict_type=DICT_TYPE_AUTO)
print(dictionary.dict_id())
print(len(dictionary.as_bytes()))
ملاحظات التوافق
تتوفر بقية الأسماء العامة في zstandard تلقائيًا عبر saad_z، بما فيها ZstdCompressor وZstdCompressionParameters وtrain_dictionary عند توفرها في الإصدار المثبت.
هذه الحزمة لا تنسخ كود zstandard الأصلي؛ بل تعتمد عليه كاعتماد خارجي. راجع ترخيص zstandard upstream من الرابط التالي:
https://github.com/indygreg/python-zstandard
الترخيص
كود واجهة saad_z مرخص MIT. أما محرك zstandard فهو مشروع مستقل بترخيص BSD-3-Clause، وتظل شروطه سارية على الاعتماد المثبت.
Metadata
Release files for saad-z 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| saad_z-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for saad_z-0.1.0-py3-none-any.whl |
Release files / saad_z-0.1.0-py3-none-any.whl
| Download URL | saad_z-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c37cae451dc186cdae74f629a22dff8269577d29844a474882d208a3bb0b7c4
|
|
BLAKE2b-256 checksum How to use checksums |
a078216fd6993a7f97047e73c8be52f0332738c091f85d0c7383cae66348a1b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.4
|
Security for saad-z 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.