1. private with Zip; 
  2. private with Zip_Streams.Array_Streams; 
  3.  
  4. package Archives.Zip_Archives is 
  5.  
  6. private 
  7.  
  8.     use Zip; 
  9.     use Zip_Streams.Array_Streams; 
  10.  
  11.     ---------------------------------------------------------------------------- 
  12.  
  13.     -- Implements an Archive class for .zip compressed files. 
  14.     type Zip_Archive is new Archive with 
  15.         record 
  16.             zipArray : A_Array_Stream; 
  17.             zipInfo  : Zip_info; 
  18.         end record; 
  19.  
  20.     -- Raises an exception on error. 
  21.     procedure Construct( this : access Zip_Archive; path : String ); 
  22.  
  23.     -- Raises an exception on error. 
  24.     procedure Construct( this     : access Zip_Archive; 
  25.                          resource : not null A_Resource_File ); 
  26.  
  27.     procedure Delete( this : in out Zip_Archive ); 
  28.  
  29.     function Exists( this     : access Zip_Archive; 
  30.                      filename : String ) return Boolean; 
  31.  
  32.     -- Raises an exception on error. 
  33.     function Load_Bitmap( this     : access Zip_Archive; 
  34.                           filename : String ) return A_Bitmap; 
  35.     pragma Postcondition( Load_Bitmap'Result /= null ); 
  36.  
  37.     -- Raises an exception on error. 
  38.     function Open( this     : access Zip_Archive; 
  39.                    filename : String ) return A_Packfile; 
  40.     pragma Postcondition( Open'Result /= null ); 
  41.  
  42.     -- Raises an exception on error. 
  43.     function Open_Chunk( this     : access Zip_Archive; 
  44.                          filename : String ) return access Stream_Element_Array; 
  45.     pragma Postcondition( Open_Chunk'Result /= null ); 
  46.  
  47. end Archives.Zip_Archives;