https://github.com/intake/python-snappy
Python bindings for the snappy google library
https://github.com/intake/python-snappy
Last synced: 5 months ago
JSON representation
Python bindings for the snappy google library
- Host: GitHub
- URL: https://github.com/intake/python-snappy
- Owner: intake
- License: other
- Created: 2011-03-27T03:40:24.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2024-10-16T20:15:53.000Z (over 1 year ago)
- Last Synced: 2025-07-31T19:39:06.970Z (10 months ago)
- Language: Python
- Homepage:
- Size: 164 KB
- Stars: 484
- Watchers: 14
- Forks: 104
- Open Issues: 28
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
python-snappy
=============
Python library for the snappy compression library from Google.
This library is distributed under the New BSD License
(https://opensource.org/license/bsd-3-clause).
Dependencies
============
* cramjam
* Supports Python >=3.8
Install
=======
Install it from PyPI:
::
pip install python-snappy
Run tests
=========
::
# run python snappy tests
nosetest test_snappy.py
# support for cffi backend
nosetest test_snappy_cffi.py
Benchmarks
==========
See ``cramjam`` for speed tests.
Commandline usage
=================
You can invoke Python Snappy to compress or decompress files or streams from
the commandline after installation as follows
Compressing and decompressing a file:
::
$ python -m snappy -c uncompressed_file compressed_file.snappy
$ python -m snappy -d compressed_file.snappy uncompressed_file
Compressing and decompressing a stream:
::
$ cat uncompressed_data | python -m snappy -c > compressed_data.snappy
$ cat compressed_data.snappy | python -m snappy -d > uncompressed_data
You can get help by running
::
$ python -m snappy --help
Snappy - compression library from Google (c)
https://google.github.io/snappy