Deduplicator: xxh32 digest can collide on large ZIMs
Maintainer antworten meist innerhalb von 1 Tag
@i-varunsharma arbeitet bereits daran.
Seit 04.12.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Follow-up from openzim/ifixit#165, as suggested by @benoit74.
Deduplicator keys items by an xxh32 digest only (zim/dedup.py), which is 32-bit. With n deduplicated items the expected number of collisions is about n²/2³³, so roughly 1 around 100k items and ~30 around 500k. A full iFixit ZIM has a lot of images, so two different images could end up with the same digest, and the second one would silently become an alias to the wrong image.
A few options:
- also store the content size with the digest and compare both, as benoit74 suggested. Cheap, but it only lowers the odds
- switch to a 128 bit hash (xxhash has
xxh3_128), which is about as fast and makes collisions practically impossible - both
My suggestion would be xxh3_128 + size as the key. I can open a PR once we agree on the approach.
- Vorherrschende Sprache
- Python
- Sterne
- 33
- Forks
- 36
- Ø Merge
- 1 T. 10 Std.
- Gemergte PRs (30 T.)
- 19
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus openzim/python-scraperlib
-
handle_user_provided_file leaves an empty temp fileEvtl. vergeben @kevincommits hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
openzim/python-scraperlib#414 ·
Maintainer antworten meist innerhalb von 1 Tag
-
HtmlRewriter: title is cut at the first `&` (entity or bare ampersand)Evtl. vergeben @rajanpanth hat das vor 23 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
openzim/python-scraperlib#401 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
[next major] Remove deprecated 'convert' parameter for optimize_image function inside optimization.pyEvtl. vergeben @Sriram-Nambiar hat das vor 51 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
openzim/python-scraperlib#292 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Metadata accepts empty BytesIO/file values although empty is not allowedEvtl. vergeben @playlikeboy hat das vor 1 Tag übernommen. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 25/100
openzim/python-scraperlib#422 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Detect and recover malformed inline data URLs missing the data: schemeEvtl. vergeben @Sriram-Nambiar hat das vor 2 Tagen übernommen. Offen
openzim/python-scraperlib#420 · 2 Reaktionen · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in openzim/python-scraperlib
Ähnliche Issues
-
auto-reported bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
stix-atlas.json: the same relationship id is used for several different mitigates relationshipsOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
backend bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
nolte/kamerplanter#3193 ·
Maintainer antworten meist innerhalb von 1 Tag
-
soup prune-prompt exits 1 after writing its output on a file over 100,000 rows, and reports a capped row count otherwiseEvtl. vergeben @abdulwaarith0 hat das heute übernommen. Offenneeds-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
MakazhanAlpamys/Soup#3690 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag