The rule is: never compress something secret together with something potentially attacker-influenced.
If the attacker can influence the traffic, they can potentially gather information about the secret by examining the effect of differing traffic patterns on the size of the encrypted result.
No, the rule is: never compress something secret together with something potentially attacker-influenced, at least if the length of the compressed data leaks.
If the attacker can influence the traffic, they can potentially gather information about the secret by examining the effect of differing traffic patterns on the size of the encrypted result.