Although yallie was the first to place my zip package on github the best place to get it since 2018 is no doubt
https://github.com/antonscheffer/as_zip With for instance a procedure to create a csv file and directly zip it.
Anton
declare
l_zip blob;
l_rc sys_refcursor;
begin
for f in 1 .. 5
loop
open l_rc for
select level r, 'test "' || level l, sysdate + level n
from dual connect by level <= f;
--
as_zip.add_csv( l_zip, l_rc, 'file' || f || '.csv', 'This is csv-file ' || f );
end loop;
--
as_zip.save_zip( l_zip, 'VAGRANT', 'zip4.zip' );
dbms_lob.freetemporary( l_zip );
end;