Serializes a PkgDb. Accumulate per-version exports with addPackage/addVersion,
then build a scope. The multi-use string pool is computed per scope; the latest scope may
be pruned to the most-downloaded packages. This is the counterpart of PkgDatabase (the reader).
Serializes a PkgDb. Accumulate per-version exports with addPackage/addVersion, then build a scope. The multi-use string pool is computed per scope; the
latestscope may be pruned to the most-downloaded packages. This is the counterpart of PkgDatabase (the reader).