Skip to content

Commit

Permalink
Update text and bump build
Browse files Browse the repository at this point in the history
  • Loading branch information
martindurant committed Feb 28, 2024
1 parent bd61888 commit 3e4d49b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 78 deletions.
81 changes: 6 additions & 75 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,12 @@ Dependencies

* cramjam

* crc32c
* Supports Python >=3.8

* Supports Python 3
Install
=======

Build & Install
===============

Build:

::

python setup.py build

Install:

::

python setup.py install


Or install it from PyPi:
Install it from PyPi:

::

Expand All @@ -50,35 +35,7 @@ Run tests
Benchmarks
==========

*snappy vs. zlib*

**Compressing:**

::

%timeit zlib.compress("hola mundo cruel!")
100000 loops, best of 3: 9.64 us per loop

%timeit snappy.compress("hola mundo cruel!")
1000000 loops, best of 3: 849 ns per loop

**Snappy** is **11 times faster** than zlib when compressing

**Uncompressing:**

::

r = snappy.compress("hola mundo cruel!")

%timeit snappy.uncompress(r)
1000000 loops, best of 3: 755 ns per loop

r = zlib.compress("hola mundo cruel!")

%timeit zlib.decompress(r)
1000000 loops, best of 3: 1.11 us per loop

**Snappy** is **twice** as fast as zlib
See ``cramjam`` for speed tests.

Commandline usage
=================
Expand Down Expand Up @@ -108,30 +65,4 @@ You can get help by running


Snappy - compression library from Google (c)
http://google.github.io/snappy

Frequently Asked Questions
==========================

**How to install it on Mac OS X?**

It has been reported a few times (Issue #7 and #23) that it can't be installed correctly the library in Mac.
The procedure should be,

::

$ brew install snappy # snappy library from Google
$ CPPFLAGS="-I/usr/local/include -L/usr/local/lib" pip install python-snappy

Try this command if libstdc++ is deprecated

::
$ CPPFLAGS="-I/usr/local/include -L/usr/local/lib -stdlib=libc++ " pip install python-snappy

Or this command in Apple Silicon:

::
$ CPPFLAGS="-I/opt/homebrew/include -L/opt/homebrew/lib" pip install python-snappy
http://google.github.io/snappy
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

import os

version = '0.7.0'
version = '0.7.1'
long_description = """
Python bindings for the snappy compression library from Google.
Expand All @@ -40,7 +40,7 @@

packages = ['snappy']
install_requires = ["cramjam"]
setup_requires = ['cramjam>=2.6.0', 'google-crc32c']
setup_requires = ['cramjam>=2.6.0']

setup(
name='python-snappy',
Expand Down
2 changes: 1 addition & 1 deletion src/snappy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
isValidCompressed,
)

__version__ = '0.7.0'
__version__ = '0.7.1'

0 comments on commit 3e4d49b

Please sign in to comment.