Hacker News new | ask | show | jobs
by TazeTSchnitzel 2979 days ago
Size of the index would just be log2(index), right?
2 comments

Your calculation works backward from already knowing the index.

I assume jgtrosh's question is more of a probability and estimation question. E.g. the string "Hello world" takes up 11 bytes and what's the size of the index into pi? To generalize a little more, to store any 11-byte sequence, what is the estimated size to store its index? To find the exact 256^11 byte sequence in pi, there will be many cases where the sizeof(index) is greater than the data itself.

Yes but index would be ~2^(length of content)