Back to... Zip-Ada

Source file : rezip_lib.ads



   1  ------------------------------------------------------------------------------
   2  --  File:            rezip_lib.ads
   3  --  Description:     Recompression tool to make archives smaller.
   4  --                   Core moved from Rezip (main)
   5  --                     Uses brute force and pick-and-choose among compression
   6  --                     tools and methods. Typically the optimal archive will
   7  --                     contain some entries compressed with the LZMA format,
   8  --                     and others with the Deflate, Deflate_e or BZip2.
   9  --                     Compression speed doesn't matter (except extreme cases),
  10  --                     only the final size does.
  11  --  Author:          Gautier de Montmollin
  12  ------------------------------------------------------------------------------
  13  
  14  with Zip;
  15  
  16  package Rezip_lib is
  17  
  18    type Zip_format_set is private;
  19  
  20    all_formats        : constant Zip_format_set;
  21    deflate_or_store   : constant Zip_format_set;
  22    fast_decompression : constant Zip_format_set;
  23  
  24    procedure Rezip (
  25      from_zip_file      : String;
  26      to_zip_file        : String;
  27      format_choice      : Zip_format_set := all_formats;  --  force output into selected format set
  28      touch              : Boolean        := False;        --  set time stamps to now
  29      lower              : Boolean        := False;        --  set full file names to lower case
  30      delete_comment     : Boolean        := False;        --  delete zip comment
  31      randomized_stable  : Positive       := 1;
  32      log_file           : String         := "";
  33      html_report        : String         := "";
  34      alt_tmp_file_radix : String         := "";           --  e.g. "X:\temp\rz_"
  35      internal_only      : Boolean        := False         --  Zip-Ada algorithms only, no ext. call
  36    );
  37      --  On randomized approaches, stop when minimized size is stable
  38      --  after randomized_stable attempts.
  39  
  40    procedure Show_external_packer_list;
  41  
  42    External_Tool_Failed : exception;
  43  
  44  private
  45  
  46    type Zip_format_set is array (Zip.PKZip_method) of Boolean;
  47  
  48    all_formats        : constant Zip_format_set := (others => True);
  49    deflate_or_store   : constant Zip_format_set :=
  50      (Zip.store | Zip.deflate => True, others => False);
  51    fast_decompression : constant Zip_format_set :=
  52      (Zip.store .. Zip.deflate_e | Zip.lzma_meth => True,
  53       Zip.bzip2_meth => False,
  54       others => False);
  55  
  56  end Rezip_lib;

Web view of Ada source code generated by GNATHTML, project: ALI_Parse version 1.0.
Zip-Ada: Ada library for zip archive files (.zip). Ada programming.
Some news about Zip-Ada and other Ada projects on Gautier's blog.