Skip to content

Commit d427d4d

Browse files
committed
Remove old requirements.txt and update README.md instructions
1 parent 9f17a70 commit d427d4d

3 files changed

Lines changed: 47 additions & 14 deletions

File tree

README.md

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[![PyPI version](https://img.shields.io/pypi/v/pyfastpfor.svg)](https://pypi.python.org/pypi/pyfastpfor/)
22
[![Downloads](https://pepy.tech/badge/pyfastpfor)](https://pepy.tech/project/pyfastpfor)
3+
34
# PyFastPFor
5+
46
Python bindings for the fast **light-weight** integer compression library [FastPFor](https://github.com/lemire/FastPFor): A research library with integer compression schemes. FastPFor is broadly applicable to the compression of arrays of 32-bit integers where most integers are small. The library seeks to exploit SIMD instructions (SSE) whenever possible. This library can decode at least 4 billions of compressed integers per second on most desktop or laptop processors. That is, it can decompress data at a rate of 15 GB/s. This is significantly faster than generic codecs like gzip, LZO, Snappy or LZ4.
57

68
# Authors
@@ -9,31 +11,65 @@ Daniel Lemire, Leonid Boytsov, Owen Kaser, Maxime Caron, Louis Dionne, Michel Le
911

1012
# Installation
1113

12-
Bindings can be installed locally:
14+
Install the latest release from PyPI:
15+
16+
```
17+
pip install pyfastpfor
18+
```
19+
20+
### Using uv (recommended)
21+
22+
[uv](https://github.com/astral-sh/uv) is a fast Python package installer and resolver.
23+
24+
To add PyFastPFor as a dependency to your project:
25+
26+
```
27+
uv add pyfastpfor
28+
```
29+
30+
Or to install it directly into your current environment:
31+
32+
```
33+
uv pip install pyfastpfor
34+
```
35+
36+
### Building from source
37+
38+
From the repository root, run:
39+
1340
```
1441
cd python_bindings
15-
pip install -r requirements.txt
16-
sudo setup.py build install
1742
```
18-
or via pip:
43+
44+
With uv:
45+
46+
```
47+
uv build
48+
uv pip install dist/*.whl
1949
```
20-
pip install pyfastpfor
50+
51+
Or with standard tools:
52+
2153
```
54+
pip install build
55+
python -m build
56+
pip install dist/*.whl
57+
```
58+
2259
The bindings build with GCC or Clang, on both x86-64 (SSE/AVX) and ARM/aarch64 (NEON, including Apple Silicon). You may also need to install Python dev-files. On Ubuntu, for Python 3 you can do it as follows:
2360

2461
```
2562
sudo apt-get install python3-dev
2663
```
2764

28-
2965
# Documentation
3066

31-
The library supports all the codecs implemented in the original [FastPFor](https://github.com/lemire/FastPFor) library (v0.5.0). To get a list of codecs, use the function ``getCodecList``.
67+
The library supports all the codecs implemented in the original [FastPFor](https://github.com/lemire/FastPFor) library (v0.5.0). To get a list of codecs, use the function ``getCodecList``.
3268

33-
Typical light-weight compression does not take context into account and, consequently, works well only for small integers. When integers are large, data differencing is a common trick to make integers small. In particular, we often deal with sorted lists of integers, which can be represented by differences between neighboring numbers.
69+
Typical light-weight compression does not take context into account and, consequently, works well only for small integers. When integers are large, data differencing is a common trick to make integers small. In particular, we often deal with sorted lists of integers, which can be represented by differences between neighboring numbers.
3470

35-
The smallest differences (**fine** deltas) are between adjacent numbers. Respective differencing and difference inverting functions are ``delta1'' and ``prefixSum1''.
71+
The smallest differences (**fine** deltas) are between adjacent numbers. Respective differencing and difference inverting functions are ``delta1'' and``prefixSum1''.
3672

37-
However, we can do reasonably well, we compute differences between numbers that are four positions apart (**coarse** deltas). Such differences can be computed and inverted more efficiently. Respective differencing and difference inverting functions are ``delta4'' and ``prefixSum4''.
73+
However, we can do reasonably well, we compute differences between numbers that are four positions apart (**coarse** deltas). Such differences can be computed and inverted more efficiently. Respective differencing and difference inverting functions are ``delta4'' and``prefixSum4''.
3874

39-
Examples of three common use scenarios (no differencing, coarse and fine deltas) are outlined in [this Python notebook](python_bindings/examples.ipynb).
75+
Examples of three common use scenarios (no differencing, coarse and fine deltas) are outlined in [this Python notebook](python_bindings/examples.ipynb).

python_bindings/MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ include pyproject.toml
33
recursive-include ./fastpfor/src *.cpp *.c
44
recursive-include ./fastpfor/headers *.h
55
recursive-include tests *.py
6-
include requirements.txt
76

87
global-exclude fastpfor/src/benchbitpacking.cpp
98
global-exclude fastpfor/src/csv2maropu.cpp

python_bindings/requirements.txt

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

0 commit comments

Comments
 (0)