Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pylzf

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pylzf

LibLZF is a very small data compression library

  • 0.1.1
  • PyPI
  • Socket score

Maintainers
1

✨ pylzf ✨

The python binding for liblzf

pypi python implementation wheel license action

安装

pip install pylzf

使用

import pylzf

pylzf.compress(b"123", 100)
pylzf.decompress(b"xxx", 100)
data = bytearray(1000)
pylzf.compress_into(b"1212", data)
pylzf.decompress_into(b"xxxx", data)

公开函数

def compress(data: bytes, outlen: int = ...) -> bytes: ...
def decompress(data: bytes, outlen: int) -> bytes: ...
def compress_into(data: bytes, out: bytearray) -> int: ...
def decompress_into(data: bytes, out: bytearray) -> int: ...

本机编译

python -m pip install setuptools wheel cython cffi
git clone https://github.com/synodriver/pylzf
cd pylzf
git submodule update --init --recursive
python setup.py bdist_wheel --use-cython --use-cffi

后端选择

默认由py实现决定,在cpython上自动选择cython后端,在pypy上自动选择cffi后端,使用LZF_USE_CFFI环境变量可以强制选择cffi

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc