Q:

Better Package for File Compression using PL/SQL?

I have an xlsx file sample.xlsx stored in a remote directory with around 1,699 KB in Size.
I have tried two popular PL/SQL packages (UTL_COMPRESS and AS_ZIP) that compresses them into gzip and zip, rescpectively.
With the code below using AS_ZIP, I have compressed the file to 1,619 KB:
declare
  g_zipped_blob blob;
  l_file_name   varchar2(100) := 'sample.xlsx';
  l_directory   varchar2(100) := 'EXT_TAB_DATA';
begin
  as_zip.add1file( g_zipped_blob, l_file_name, as_zip.file2blob(l_directory, l_file_name));
  as_zip.finish_zip( g_zipped_blob );
  as_zip.save_zip( g_zipped_blob, l_directory, 'my2.zip' );
  dbms_lob.freetemporary( g_zipped_blob );
end;

With the code below (taken from the original post) using UTL_COMPRESS, I have compressed the file to 1,618 KB:
DECLARE
   in_filename VARCHAR2(100) := 'sample.xlsx';
   l_directory   varchar2(100) := 'EXT_TAB_DATA';
   src_file   BFILE;
   v_content  BLOB;
   v_blob_len INTEGER;
   v_file     utl_file.file_type;
   v_buffer   RAW(32767);
   v_amount   BINARY_INTEGER := 32767;
   v_pos      INTEGER := 1;
BEGIN
   src_file := bfilename(l_directory, in_filename);
   dbms_lob.fileopen(src_file, dbms_lob.file_readonly);
   v_content  := utl_compress.lz_compress(src_file, 9);
   v_blob_len := dbms_lob.getlength(v_content);
   v_file     := utl_file.fopen(l_directory,
                                in_filename || '.gz',
                                'wb');
   WHILE v_pos < v_blob_len LOOP
      dbms_lob.READ(v_content, v_amount, v_pos, v_buffer);
      utl_file.put_raw(v_file, v_buffer, TRUE);
      v_pos := v_pos + v_amount;
   END LOOP;
   utl_file.fclose(v_file);

EXCEPTION
   WHEN OTHERS THEN
      IF utl_file.is_open(v_file) THEN
         utl_file.fclose(v_file);
      END IF;
      RAISE;
END;

Although minimal, it seems that UTL_COMPRESS has better compression in terms of file size.
I was wondering if there was some unseen advantage using the custom AS_ZIP over the Oracle-supplied UTL_COMPRESS?
Thank you.

A:

Anton Scheffer explains why he wrote the AS_ZIP package in this blog post . It should answer your question. Basically it's to support additional zip formats.
Also it has a link to a more recent version of the package than the link in your post.
As for which one to use, my standard line is always to use the Oracle built-in functionality unless we really need the something extra from a third-party offering. 
Using Oracle's standard functionality means:

Oracle Support covers us
we don't have to maintain the code
our code base is that much simpler for new joiners

