Skip to content

Commit c6d2a7d

Browse files
authored
Merge pull request #136 from martindurant/streams
Streams
2 parents 0862b62 + 3e4d49b commit c6d2a7d

9 files changed

Lines changed: 61 additions & 656 deletions

File tree

README.rst

Lines changed: 6 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,12 @@ Dependencies
1010

1111
* cramjam
1212

13-
* crc32c
13+
* Supports Python >=3.8
1414

15-
* Supports Python 3
15+
Install
16+
=======
1617

17-
Build & Install
18-
===============
19-
20-
Build:
21-
22-
::
23-
24-
python setup.py build
25-
26-
Install:
27-
28-
::
29-
30-
python setup.py install
31-
32-
33-
Or install it from PyPi:
18+
Install it from PyPi:
3419

3520
::
3621

@@ -50,35 +35,7 @@ Run tests
5035
Benchmarks
5136
==========
5237

53-
*snappy vs. zlib*
54-
55-
**Compressing:**
56-
57-
::
58-
59-
%timeit zlib.compress("hola mundo cruel!")
60-
100000 loops, best of 3: 9.64 us per loop
61-
62-
%timeit snappy.compress("hola mundo cruel!")
63-
1000000 loops, best of 3: 849 ns per loop
64-
65-
**Snappy** is **11 times faster** than zlib when compressing
66-
67-
**Uncompressing:**
68-
69-
::
70-
71-
r = snappy.compress("hola mundo cruel!")
72-
73-
%timeit snappy.uncompress(r)
74-
1000000 loops, best of 3: 755 ns per loop
75-
76-
r = zlib.compress("hola mundo cruel!")
77-
78-
%timeit zlib.decompress(r)
79-
1000000 loops, best of 3: 1.11 us per loop
80-
81-
**Snappy** is **twice** as fast as zlib
38+
See ``cramjam`` for speed tests.
8239

8340
Commandline usage
8441
=================
@@ -108,30 +65,4 @@ You can get help by running
10865

10966

11067
Snappy - compression library from Google (c)
111-
http://google.github.io/snappy
112-
113-
Frequently Asked Questions
114-
==========================
115-
116-
**How to install it on Mac OS X?**
117-
118-
It has been reported a few times (Issue #7 and #23) that it can't be installed correctly the library in Mac.
119-
The procedure should be,
120-
121-
::
122-
123-
$ brew install snappy # snappy library from Google
124-
$ CPPFLAGS="-I/usr/local/include -L/usr/local/lib" pip install python-snappy
125-
126-
Try this command if libstdc++ is deprecated
127-
128-
::
129-
130-
$ CPPFLAGS="-I/usr/local/include -L/usr/local/lib -stdlib=libc++ " pip install python-snappy
131-
132-
133-
Or this command in Apple Silicon:
134-
135-
::
136-
137-
$ CPPFLAGS="-I/opt/homebrew/include -L/opt/homebrew/lib" pip install python-snappy
68+
http://google.github.io/snappy

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@
3131

3232
import os
3333

34-
version = '0.7.0'
34+
version = '0.7.1'
3535
long_description = """
3636
Python bindings for the snappy compression library from Google.
3737
3838
More details about Snappy library: http://google.github.io/snappy
3939
"""
4040

4141
packages = ['snappy']
42-
install_requires = ['cramjam>=2.6.0', 'crc32c']
43-
setup_requires = ['cramjam>=2.6.0', 'crc32c']
42+
install_requires = ["cramjam"]
43+
setup_requires = ['cramjam>=2.6.0']
4444

4545
setup(
4646
name='python-snappy',
4747
version=version,
4848
author='Andres Moreira',
4949
author_email='andres@andresmoreira.com',
50-
url='http://github.com/andrix/python-snappy',
50+
url='http://github.com/intake/python-snappy',
5151
description='Python library for the snappy compression library from Google',
5252
long_description=long_description,
5353
keywords='snappy, compression, google',

src/snappy/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,4 @@
1212
isValidCompressed,
1313
)
1414

15-
from .hadoop_snappy import (
16-
stream_compress as hadoop_stream_compress,
17-
stream_decompress as hadoop_stream_decompress,
18-
)
19-
20-
__version__ = '0.7.0'
15+
__version__ = '0.7.1'

src/snappy/hadoop_snappy.py

Lines changed: 0 additions & 216 deletions
This file was deleted.

0 commit comments

Comments
 (0)