1275793eaSopenharmony_ci ZLib for Ada thick binding (ZLib.Ada) 2275793eaSopenharmony_ci Release 1.3 3275793eaSopenharmony_ci 4275793eaSopenharmony_ciZLib.Ada is a thick binding interface to the popular ZLib data 5275793eaSopenharmony_cicompression library, available at http://www.gzip.org/zlib/. 6275793eaSopenharmony_ciIt provides Ada-style access to the ZLib C library. 7275793eaSopenharmony_ci 8275793eaSopenharmony_ci 9275793eaSopenharmony_ci Here are the main changes since ZLib.Ada 1.2: 10275793eaSopenharmony_ci 11275793eaSopenharmony_ci- Attention: ZLib.Read generic routine have a initialization requirement 12275793eaSopenharmony_ci for Read_Last parameter now. It is a bit incompatible with previous version, 13275793eaSopenharmony_ci but extends functionality, we could use new parameters Allow_Read_Some and 14275793eaSopenharmony_ci Flush now. 15275793eaSopenharmony_ci 16275793eaSopenharmony_ci- Added Is_Open routines to ZLib and ZLib.Streams packages. 17275793eaSopenharmony_ci 18275793eaSopenharmony_ci- Add pragma Assert to check Stream_Element is 8 bit. 19275793eaSopenharmony_ci 20275793eaSopenharmony_ci- Fix extraction to buffer with exact known decompressed size. Error reported by 21275793eaSopenharmony_ci Steve Sangwine. 22275793eaSopenharmony_ci 23275793eaSopenharmony_ci- Fix definition of ULong (changed to unsigned_long), fix regression on 64 bits 24275793eaSopenharmony_ci computers. Patch provided by Pascal Obry. 25275793eaSopenharmony_ci 26275793eaSopenharmony_ci- Add Status_Error exception definition. 27275793eaSopenharmony_ci 28275793eaSopenharmony_ci- Add pragma Assertion that Ada.Streams.Stream_Element size is 8 bit. 29275793eaSopenharmony_ci 30275793eaSopenharmony_ci 31275793eaSopenharmony_ci How to build ZLib.Ada under GNAT 32275793eaSopenharmony_ci 33275793eaSopenharmony_ciYou should have the ZLib library already build on your computer, before 34275793eaSopenharmony_cibuilding ZLib.Ada. Make the directory of ZLib.Ada sources current and 35275793eaSopenharmony_ciissue the command: 36275793eaSopenharmony_ci 37275793eaSopenharmony_ci gnatmake test -largs -L<directory where libz.a is> -lz 38275793eaSopenharmony_ci 39275793eaSopenharmony_ciOr use the GNAT project file build for GNAT 3.15 or later: 40275793eaSopenharmony_ci 41275793eaSopenharmony_ci gnatmake -Pzlib.gpr -L<directory where libz.a is> 42275793eaSopenharmony_ci 43275793eaSopenharmony_ci 44275793eaSopenharmony_ci How to build ZLib.Ada under Aonix ObjectAda for Win32 7.2.2 45275793eaSopenharmony_ci 46275793eaSopenharmony_ci1. Make a project with all *.ads and *.adb files from the distribution. 47275793eaSopenharmony_ci2. Build the libz.a library from the ZLib C sources. 48275793eaSopenharmony_ci3. Rename libz.a to z.lib. 49275793eaSopenharmony_ci4. Add the library z.lib to the project. 50275793eaSopenharmony_ci5. Add the libc.lib library from the ObjectAda distribution to the project. 51275793eaSopenharmony_ci6. Build the executable using test.adb as a main procedure. 52275793eaSopenharmony_ci 53275793eaSopenharmony_ci 54275793eaSopenharmony_ci How to use ZLib.Ada 55275793eaSopenharmony_ci 56275793eaSopenharmony_ciThe source files test.adb and read.adb are small demo programs that show 57275793eaSopenharmony_cithe main functionality of ZLib.Ada. 58275793eaSopenharmony_ci 59275793eaSopenharmony_ciThe routines from the package specifications are commented. 60275793eaSopenharmony_ci 61275793eaSopenharmony_ci 62275793eaSopenharmony_ciHomepage: http://zlib-ada.sourceforge.net/ 63275793eaSopenharmony_ciAuthor: Dmitriy Anisimkov <anisimkov@yahoo.com> 64275793eaSopenharmony_ci 65275793eaSopenharmony_ciContributors: Pascal Obry <pascal@obry.org>, Steve Sangwine <sjs@essex.ac.uk> 66