Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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 '13 at 20:24
What's the source of this example? – Lorenzo Pistone May 23 '13 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 '13 at 22:17
I have to correct myself. They're compressed after being sent, not before. – Szabolcs May 23 '13 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 '13 at 7:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.