Dumps the given resource and all resources linked to it into the given
        ZIP file.

def to_zipfile(self, resource, zipfile):
        """
        Dumps the given resource and all resources linked to it into the given
        ZIP file.
        """
        rpr_map = self.to_strings(resource)
        with ZipFile(zipfile, 'w') as zipf:
            for (mb_cls, rpr_string) in iteritems_(rpr_map):
                fn = get_collection_filename(mb_cls, self.__content_type)
                zipf.writestr(fn, rpr_string, compress_type=ZIP_DEFLATED)