code: def save_toc(self, tocpos):
          
          self.tocpos = tocpos
          tocstr = self.toc.tobinary()
          self.toclen = len(tocstr)
          self.lib.write(tocstr)
docs: Save the table of contents to disk.