Convert graph to binary format
Highliy experimental

Please ignore this