At the moment, expand and compress work even on the most complex .nxs files I tested it on, to reproduce a binary-identical version of the original file. This is not guaranteed though, so it's best practice to keep a backup copy of your .nxs (just in case).
I hope someone else finds this useful.