code: def save(self, to_dir, compressionlevel=9):
          u
          if os.path.exists(to_dir) and not os.path.isdir(to_dir):
              raise Exception('Not a directory : %s' % to_dir)
          elif not os.path.exists(to_dir):
              os.makedirs(to_dir, mode=int('0755', 8))
          _save(os.path.join(to_dir, FILE_USER_FST_DATA), self.compiledFST[0], compressionlevel)
          _save(os.path.join(to_dir, FILE_USER_ENTRIES_DATA), pickle.dumps(self.entries), compressionlevel)
docs: u"""
          Save compressed compiled dictionary data.
  
          :param to_dir: directory to save dictionary data
          :compressionlevel: (Optional) gzip compression level. default is 9