Compression schemes (in the form of code books) to save on telegraphy costs have existed almost as long as the telegraph itself.
From [1]: "Elaborate commercial codes which encoded complete phrases into single words were developed and published as codebooks of thousands of phrases and sentences with corresponding codewords... Cable tolls were charged by the word, and telegraph companies counted codewords like any other words, so a carefully constructed code could reduce message lengths enormously."
Is D&D set in a world where the telegraph exists? I've always gotten the impression that insofar as it's linked to our history of technological progression it is set well before that invention, while after the times of e.g. the Caesar cipher.
Good point. So here is a compression scheme from about 350 BC, describing how to pass messages from one mountain peak to another, using a torch and a water clock [1][2]:
"The water-clocks are an early long-distance-communication-system. Every communicating party had exactly the same jar, with a same-size-hole that was closed and the same amount of water in it. In the jar was a stick with different messages written on. When one party wanted to tell something to the other it made a fire-sign. When the other answered, both of them opened the hole at the same time. And with the help of another fire-sign closed it again at the same time, too. In the end the water covered the stick until the point of the wanted message."
From [1]: "Elaborate commercial codes which encoded complete phrases into single words were developed and published as codebooks of thousands of phrases and sentences with corresponding codewords... Cable tolls were charged by the word, and telegraph companies counted codewords like any other words, so a carefully constructed code could reduce message lengths enormously."
[1] https://en.wikipedia.org/wiki/Commercial_code_(communication...