Your code reads the file content from the DB - you know how to do that - then ZIP (or RAR, but ZIP is built into .NET, RAR isn't) the data into a single volume:
c# - Create zip file from byte[] - Stack Overflow[
^]
You then send that to the client in the usual way via the Response:
Response.Clear();
Response.AddHeader("Cache-Control", "no-cache, must-revalidate, post-check=0, pre-check=0");
Response.AddHeader("Pragma", "no-cache");
Response.AddHeader("Content-Description", "File Download");
Response.AddHeader("Content-Type", "application/force-download");
Response.AddHeader("Content-Transfer-Encoding", "binary\n");
Response.AddHeader("content-disposition", "attachment;filename=" + fileName);
Response.BinaryWrite(zipData);
Response.End();