You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ A simple Python wrapper around [qoi](https://github.com/phoboslab/qoi), the "Qui
6
6
7
7
- Lossless with comparable compression to PNG, but fast! It encodes 10x faster and decodes around 5x faster than PNG in OpenCV or PIL.
8
8
- You can make it lossy with a simple trick, and then you can get similar compression to JPEG but a whole lot faster. (These number vary a lot depending on how "lossy" you make JPEG or QOI). That's cool.
9
+
- Multi-threaded - no GIL hold-ups here.
9
10
10
11
## Install
11
12
@@ -39,7 +40,26 @@ from qoi.benchmark import benchmark
39
40
benchmark() # Check out the arguments if you're interested
40
41
```
41
42
42
-
## Benchmarks
43
+
If you want to really max out your CPU:
44
+
45
+
```python
46
+
from concurrent.futures import ThreadPoolExecutor, wait
futures = [pool.submit(worker) for _ inrange(10000)]
59
+
wait(futures)
60
+
```
61
+
62
+
## (Single-threaded) Benchmarks
43
63
44
64
If we consider lossless, then we're generally comparing with PNG. Yup, there are others, but they're not as common. Benchmarks:
45
65
@@ -113,7 +133,6 @@ When you're on `main` on your local, `git tag vX.X.X` then `git push origin vX.X
113
133
- Benchmarks - add real images, and also compare performance with QOI to see overhead of python wrapper.
114
134
-`setuptools_scm_git_archive`?
115
135
- Code completion?
116
-
- Investigate a simple 'lossy' compression with QOI - halve the image size and compress, and on decode, just upscale. It'll likely be very visually similar, but also much smaller, but should compare with JPEG.
0 commit comments