Skip to content

antonscheffer/as_zip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

as_zip

A PLSQL package to get a file from a zip-file into a blob, and to create a zip-file from file(s) based on a/some blob(s).

  • Can read deflate64 format
  • Can read zip64 format
  • with Winzip and zipcrypto encryption

Any simularities with APEX_ZIP and this as_zip repository are no coincidence: both are based on my code. For the origin see https://technology.amis.nl/it/parsing-a-microsoft-word-docx-and-unzip-zipfiles-with-plsql/

Conditional compilation / required grants

Default as_zip doesn't need any extra grants on Oracle supplied packages to run, but ....

In the package spec are 2 constants which control the conditional compilation of the package body:

  • use_dbms_crypto constant boolean := false;
  • use_utl_file constant boolean := false;

With those constants you can control usage (and required grant) of the Oracle packages dbms_crypto and utl_file.

dbms_crypto is used for the Winzip AES encrypting, if you disable usage of dbms_crypto a much slower plsql function is used, based on as_crypto. If you enable it you will need execute right on the Oracle supplied package dbms_crypto.

utl_file is only used in as_zip.save_zip, you have to decide for yourself it you need to save a generated zip file. But if you want to save a zip file on the file system of your database server you will have to set use_utl_file to true, need execute right on the Oracle supplied package utl_file and write access on a directory object.

You might have to (re)compile the package body after you make any changes to these constants.