comp.lang.ada
 help / color / mirror / Atom feed
From: Gautier <gautier.demontmollin@maths.unine.ch>
Subject: Ann: unzip-ada, v.06 (streams)
Date: 2000/02/10
Date: 2000-02-10T00:00:00+00:00	[thread overview]
Message-ID: <38A313E2.6DE9A18B@maths.unine.ch> (raw)

Hi. To be short, zipfile-to-stream (Unzip.Streams) is
now available.

Page: http://members.xoom.com/gdemont/unzipada.htm
Direct: http://members.xoom.com/gdemont/logiciel/unzada06.zip

--
Gautier

PS: examples:

(1)

with Ada.Text_IO;                       use Ada.Text_IO;
with Unzip.Streams;                     use Unzip.Streams;

procedure test_unz_streams is
  f: Zipped_File_Type;
  s: Stream_Access;
  c: character;
  begin
    Open(f,"adainc.zip","system.ads");
    s:= Stream(f);
    while not End_of_file(f) loop
      Character'Read(s,c);
      Put(c);
    end loop;
    Close(f);
  end;

(2)
  zip: constant string:= "demo3d00.dat";
  zif: Unzip.zip_info; -- zip directory structure for fast access

  procedure Load_zipped_BMP_texture(name: String; Texture: out 
p_Texture_map) is
    f: Zipped_File_Type;
    begin
      Open(f,zif,name);
      Load_BMP_texture( Stream(f), Texture );
      Close(f);
    end Load_zipped_BMP_texture;
...
  Unzip.Load_zip_info( zip, zif );
  Load_zipped_BMP_texture( "t004p000.bmp",  Duke3D_tex(1) );
...




                 reply	other threads:[~2000-02-10  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox