'Reconstruct from frozen data.'

def load(self, stream, format):

    if isinstance(format, string_types):
        format = self.formats[format]
    frozen = format.load(stream)
    if ((not isinstance(frozen, dict)) or (frozen.get('envversion') != self.env.version)):
        raise ValueError('old    format')
    index2fn = frozen['docnames']
    self._filenames = dict(zip(index2fn, frozen['filenames']))
    self._titles = dict(zip(index2fn, frozen['titles']))
    def load_terms(mapping):
        rv = {}
        for (k, v) in iteritems(mapping):
            if isinstance(v, int):
                rv[k] = set([index2fn[v]])
            else:
                rv[k] = set((index2fn[i] for i in v))
        return rv
    self._mapping = load_terms(frozen['terms'])
    self._title_mapping = load_terms(frozen['titleterms'])
