3 ms·
How does a 3 byte prefix reduce a 4B data set to 250 records? Those bytes would have to be 256 bits each.
by dexterdog 7y ago
How does a 3 byte prefix reduce a 4B data set to 250 records? Those bytes would have to be 256 bits each.
- zaroth 7y ago4B records is 2^32 which is 2^24 * 2^8 which is 256 (2^8) records for every 3 bytes (2^24) prefix.
- dexterdog 7y agoI guess I assumed the logic was that you take a sha256 of, say 32501257be4512a04a184fed989fd5e46cd4d30f6ef7c8d20d07d90f82e83aaf and say give me all entries from the 4B that begin with 325 (or end with aaf) which would take your 4B and divide it by 16 3 times giving you about 1M?
- usmannk 7y agoIt’s 2 hex chars per byte. You have to divide by 16 6 times. Or rather by 32 (2^8) 3 times. 0x0 - 0xF can be represented with 4 bits or half a byte.