Python-LZO -- Python bindings for LZO
Copyright (c) 1996-2002 Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/opensource/lzo/
Copyright (c) 2011-2016 Joshua D. Boyd
<jdboyd@jdboyd.net>
https://github.com/jd-boyd/python-lzo
LZO is a portable lossless data compression library written in ANSI C. It offers pretty fast compression and very fast decompression. Decompression requires no memory.
In addition there are slower compression levels achieving a quite competitive compression ratio while still decompressing at this very high speed.
Python-LZO provides Python bindings for LZO, i.e. you can access the LZO library from your Python scripts thereby compressing ordinary Python strings.
pip install python-lzo
Or explicitly from source, either from a specific release or from the repo (requires build tools):
pip install python-lzo-x.y.tar.gz
pip install https://[...]/python-lzo-x.y.tar.gz
pip install git+https://github.com/jd-boyd/python-lzo
Building from source requires build tools. On most Linux distributions
they are probably already installed. On Windows you need
Microsoft C++ Build Tools
(which should already be installed if you have Visual Studio).
On macOS you need XCode installed, or something else that provides a suitable C
compiler. Then either git clone
, or download a source distribution and untar it.
Once you are in the root of the project directory where pyproject.toml
is located,
run python -m build -w
. This should build a wheel in the dist
directory.
You might need to install build
with pip install build
.
If you really want to build a wheel for Python 2.7 on Windows you'll need the Microsoft Visual C++ Compiler for Python 2.7.
Python-LZO comes with built-in documentation which is accessible using
>>> import lzo
>>> help(lzo)
Additionally you should read the docs and study the example programs that ship with the LZO library.
Python 2.7 is still supported but without being a priority. Support will be dropped soon.
Wheels are built with cibuildwheel on GitHub Actions. Tests are run for all combinations of platform and Python version that it can run tests for.
- Update version in
pyproject.toml
,setup.py
and theMODULE_VERSION
define inlzomodule.c
. - Update NEWS.
- Tag with new release.
- wheels (download from github actions)
- Upload to PyPi (
twine upload dist/*
)
The LZO and Python-LZO algorithms and implementations are Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Markus Franz Xaver Johannes Oberhumer markus@oberhumer.com
The Python-LZO algorithms implementated post 2011 are Copyright (C) 2011, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, & 2023 Joshua D. Boyd jdboyd@jdboyd.net and others as denoted in the git history.
The LZO and Python-LZO algorithms and implementations are distributed under the terms of the GNU General Public License (GPL). See the file COPYING.