I was reading about how there is an upper limit to how fast information can be transmitted over a given channel - the Shannon–Hartley theorem.
I was wondering how this theorem works with codebooks. For example, say my friend and I share a codebook that maps every possible grammatical sentence to an integer.
Then no matter how complex a sentence I want to make, all I need to do is send that single integer! Sure, such a codebook would be huge, huge, huge. But does that matter? I was still able to communicate a sentence of arbitrary complexity just by sending a single number.
Basically, does the Shannon–Hartley theorem take into consideration the size of the codebooks approaching infinity? The codebook itself wouldn't need to be transmitted since we can have a copy sitting with us in advance. Or perhaps do a look up in a database.
If the numbers get very large, my friend and I can work in hexadecimal. Or even a number system with 200 characters. That would cut down the size of the numbers considerably.
I know all this is impractical. I'm just curious about how it works in principle...