Message-ID: <38A33AA0.C070B77E@maths.unine.ch> Date: Thu, 10 Feb 2000 22:24:32 +0000 From: Gautier X-Mailer: Mozilla 4.7 (Macintosh; I; PPC) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Ann: unzip-ada, v.06 (streams) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: mac13-32.unine.ch X-Trace: 10 Feb 2000 22:23:11 +0100, mac13-32.unine.ch Lines: 48 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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 Tested on GNAT/DOS (DJGPP) but compiler/OS independent. Happy unzippings... 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) ); ...