| --- |
| license: cc0-1.0 |
| pretty_name: Common Crawl document-digest bloom filter |
| tags: |
| - bloom-filter |
| - file-hashes |
| --- |
| |
| # Common Crawl document-digest bloom filter |
|
|
| Membership filter over payload sha1 digests of **document-type |
| captures** (PDF ~74%, DOC/XLS/PPT/EPUB and similar) from one Common |
| Crawl crawl's URL index — the ~1% of CC that isn't HTML. CC digests |
| are SHA-1 of the (possibly truncated pre-2025) WARC payload; for |
| static documents this equals the file's raw sha1. |
|
|
| - **30,951,194 sha1 keys** (UPPERCASE hex), p = 1e-4, 71 MiB |
| - Source: CC-MAIN index `content_digest` column, filtered by MIME |
| (crawl data © Common Crawl, generously public; this digest |
| compilation CC0) |
| - One crawl only — a document must have been live and crawled that |
| month to appear; more crawls widen coverage |
|
|
| ## Rebuild |
|
|
| `cc_extract_job.py` in this repo streams one crawl's CDXJ index |
| (~1 h locally, $0), `cc_digests_to_hex.py` converts the base32 |
| digests to hex, `./dcso_bloom_build.py cc.sha1.bloom sha1` builds |
| the filter. |
|
|
| ## Format |
|
|
| DCSO bloom filter format (`github.com/DCSO/bloom`), the same format |
| CIRCL publishes hashlookup in: 48-byte little-endian u64 header |
| (version, n, p, k, m, N) followed by the bit array. Keys are hex |
| digest strings — **UPPERCASE for sha1, lowercase for sha256** (the |
| hashlookup convention). Any DCSO-compatible reader works. |
|
|
| Membership answers are probabilistic: p = 1e-4 false-positive rate, |
| no false negatives. Confirm anything important against the source. |
|
|