# Is the TCPIP link type compressed?

Since I'm already piping a MathLink connection in a ssh tunnel (connect back is a pain!), I wonder if it makes sense to compress the data in the stream (ssh -C). As with any optimization matter, one should measure, but unfortunately it seems there's no way to get statistics out of ssh on the connection so I cannot just test and measure the gain or loss. My question is then, is it known whether this MathLink type is already compressed?

-
My naive guess is that it is not. The guess is based on the fact that large enough GraphicsBox expressions get compressed explicitly before being sent to the kernel. –  Szabolcs May 23 at 20:24
What's the source of this example? –  Lorenzo Pistone May 23 at 21:48
It isn't compressed. Whether you would see any improvement using your own compression is hard to guess. –  Todd Gayley May 23 at 22:17
I have to correct myself. They're compressed after being sent, not before. –  Szabolcs May 23 at 23:19
There are two separate TCP connections in each link because one is used for data and the other is for MathLink messages (like MLTerminateMessage, MLAbortMessage, etc.) These messages have to be delivered even if the data channel is stalled. –  Todd Gayley May 24 at 7:32