MX (.mx) is Wolfram Language serialized package format developed by Wolfram Research. It stores arbitrary Wolfram Language expressions in a serialized format optimized for fast loading and preserves anything including the options, etc. For example
res = RandomGraph[{15, 35}, VertexSize -> "BetweennessCentrality"]
![enter image description here](http://community.wolfram.com//c/portal/getImageAttachment?filename=sdfq5etrhbdsfasva.svg&userId=11733)
Save the fale with DumpSave
DumpSave["res.mx", res];
Now relaunch the kernel:
Exit
And reload the file:
<< res.mx
You will not see result but you have the definition of your variable:
res
![enter image description here](http://community.wolfram.com//c/portal/getImageAttachment?filename=sdfq5etrhbdsfasva.svg&userId=11733)
Keep in mind that MX files cannot be exchanged between different operating systems or versions of the Wolfram System. In this case you can Export compressed string of any expression:
Compress[res]
Export["res.txt", %]
![enter image description here](http://community.wolfram.com//c/portal/getImageAttachment?filename=2015-10-25_16-44-39.png&userId=11733)
and Import it back intact:
Uncompress[Import["res.txt"]]
![enter image description here](http://community.wolfram.com//c/portal/getImageAttachment?filename=sdfq5etrhbdsfasva.svg&userId=11733)
I'd recommend careful reading through: How do I save a variable or function definition to a file?