Deduplicator: xxh32 digest can collide on large ZIMs
維護者通常 1 天內回覆
@i-varunsharma 已經在處理了。
開始於 2026年12月4日。
評估
這個 Issue 還沒有評估資料。
描述
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.
- 主要語言
- Python
- 星號
- 33
- 分支
- 36
- 平均合併
- 1 天 10 小時
- 30 天內合併 PR
- 19
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
openzim/python-scraperlib 的其他 Issue
-
handle_user_provided_file leaves an empty temp file可能已有人在做 @kevincommits 於 3 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 85/100
openzim/python-scraperlib#414 ·
維護者通常 1 天內回覆
-
HtmlRewriter: title is cut at the first `&` (entity or bare ampersand)可能已有人在做 @rajanpanth 於 23 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 77/100
openzim/python-scraperlib#401 · 3 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
[next major] Remove deprecated 'convert' parameter for optimize_image function inside optimization.py可能已有人在做 @Sriram-Nambiar 於 51 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 68/100
openzim/python-scraperlib#292 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Metadata accepts empty BytesIO/file values although empty is not allowed可能已有人在做 @playlikeboy 於 1 天前認領。 未關閉
難度 1/5 1-3 小時 新手友好度 25/100
openzim/python-scraperlib#422 ·
維護者通常 1 天內回覆
-
Detect and recover malformed inline data URLs missing the data: scheme可能已有人在做 @Sriram-Nambiar 於 2 天前認領。 未關閉
openzim/python-scraperlib#420 · 2 個 reaction · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 openzim/python-scraperlib 的全部 Issue
相似的 Issue
-
auto-reported bug
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
-
backend bug
難度 2/5 1-3 小時 新手友好度 86/100
nolte/kamerplanter#3193 ·
維護者通常 1 天內回覆
-
soup prune-prompt exits 1 after writing its output on a file over 100,000 rows, and reports a capped row count otherwise可能已有人在做 @abdulwaarith0 今天認領。 未關閉needs-triage
難度 2/5 1-3 小時 新手友好度 84/100
MakazhanAlpamys/Soup#3690 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆