https://github.com/synodriver/pysmaz
compression for very small strings
https://github.com/synodriver/pysmaz
cffi compression cython smaz
Last synced: about 1 year ago
JSON representation
compression for very small strings
- Host: GitHub
- URL: https://github.com/synodriver/pysmaz
- Owner: synodriver
- Created: 2022-07-02T10:37:48.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-14T06:02:50.000Z (about 2 years ago)
- Last Synced: 2024-04-14T10:51:06.313Z (about 2 years ago)
- Topics: cffi, compression, cython, smaz
- Language: Python
- Homepage:
- Size: 311 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- Changelog: changename.py
Awesome Lists containing this project
README
✨ Pysmaz ✨
The python binding for smaz
[](https://pypi.org/project/python-smaz/)





### 安装
```
pip install python-smaz
```
### usage
```python
import pysmaz
def compress(data: bytes, output_size: int = ...) -> bytes: ...
def decompress(data: bytes, output_size: int = ...) -> bytes: ...
def compress_into(data: bytes, output: bytearray) -> int: ...
def decompress_into(data: bytes, output: bytearray) -> int: ...
```
### 本机编译
```
python -m pip install setuptools wheel cython cffi
git clone https://github.com/synodriver/pysmaz
cd pysmaz
git submodule update --init --recursive
python setup.py bdist_wheel --use-cython --use-cffi
```
### 后端选择
默认由py实现决定,在cpython上自动选择cython后端,在pypy上自动选择cffi后端,使用```SMAZ_USE_CFFI```环境变量可以强制选择cffi