private static void packDatabase(String name, String contentType, File dbFile, File outputFile,
			TaskMonitor monitor) throws IOException, CancelledException {

		if (monitor == null) {
			monitor = TaskMonitor.DUMMY;
		}
		monitor.setMessage("Packing file...");

		try (InputStream itemIn = new FileInputStream(dbFile)) {
			ItemSerializer.outputItem(name, contentType, FolderItem.DATABASE_FILE_TYPE,
				dbFile.length(), itemIn, outputFile, monitor);
		}
	}
Create a packed file from an existing non-packed DB file.
@param name name to associate with packed content
@param contentType supported DB content type
@param dbFile existing non-packed DB file
@param outputFile new packed DB file to be created or overwritten
@param monitor save/pack monitor
@throws IOException if IO error occurs
@throws CancelledException if monitor cancels operation
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/db/PackedDatabase.java