https://github.com/dabura667/electrum/blob/sendstealth/lib/bitcoin.py#L191You are basically comparing the prefix to the trailing bytes at the end of the stealth address.
If the stealth address ends with a 0x00 that means a 0 bit length prefix.
if it is 0x0B then there will be two bytes tagged on to the end (because you need at least 2 bytes to represent 11 bits and 0x0B is 11)
so the sender takes the OP_RETURN script and hashes it with the nonce until the first 11 bits match the 1st 11 bits of the prefix bytes (the two bytes at the end of the stealth address)
This makes it easier for the receiver to find their payments, as the obelisk server stores all the stealth OP_RETURNS in a table along with the hash value given by double sha256ing the script + nonce.
So instead of checking every single one (like they do now) You can narrow it down to specific transactions.
The higher the prefix bit count, the harder it is to send to you but most people will probably only pick like a 3-4 bit prefix just to make synchronizing a tad faster. Higher the bitcount the less anonymity the stealth address has. (in fact, I think a 32 bit prefix that just tells the sender to place the 4 byte prefix AS THE NONCE and use that as an optional fully transparent re-usable address is one use case imo, as you can paste it statically on a website but you won't be reusing addresses when people send to you.
Anywho, any other questions?