There were entire dictionaries compiled so that words in a telegram could be kept to a minimum.
https://archive.org/stream/adamscablecodex00cogoog#page/n22/...
A couple of extracts from the preface:
The value of this code will be seen at a glance. We will suppose
that the friend abroad is in Paris and is about to leave for London and
wishes to apprise his friend at home of that fact. He turns to the Index
and finds sentences beginning with "Am going to," "Am leaving for,"
etc., are to be found on pages 80 to 82, and then makes up the following
message:— "INGRATE, LONDON, TUESDAY," which, when trans-
lated by the receiver, means, "Am going to London and expect to reach
there Tuesday morning. Telegrams sent to me there shall reach me
promptly." In this message twenty words are sent at the cost of but
three.
And,
Furthermore, in sending and receiving messages, do not fail to take
time to read the telegram carefully, and re-check it to and from the code.
Too much care cannot he taken in the translation of cable messages, as an
error may cost both the sender and the receiver a deal of trouble, worry,
and expense.