dump string memory to binary and restore the string memory from binary file