Looking at the Archive module it’s not immediately clear how to go about it (or how best to go about it)—
What have you tried so far? Maybe the examples in the documentation are not self-explanatory enough?
it would make the most sense to construct the Zip as a stream and return the stream, as opposed to constructing the Zip in memory (or on disk) and then streaming it from there.
The streaming capabilities of the Archive Module have been improved over time, but if you need to serialize XML documents on the fly, and if your total output exceeds the amount of free memory, it might be better to temporarily write your files to disk. Another reason to write files to disk can be that your clients have a slow connection, and it would block too many server-side resources if a transaction is finalized only after the full download.