Guys,
I added zlib support to Open in devel. I have chosen to extend the
core distro and system libs because, if ozmake (or a tool like it) is
to become a basic building tool, the functionality that it assumes has
to be available in the core.
platform/emulator/zlibio.cc
implements the zlib support
platform/emulator/modZlibIO.spec
describes the corresponding boot module
share/lib/op/ZlibIO.oz
implements the CompressedFile class
share/lib/op/Open
was extended to additionally export the CompressedFile class
that it obtains from ZlibIO.oz
The API of Open.compressedFile remains essentially identical to
Open.file, but uses zlib and also inherits its limitations (read and
write flags are mutually exclusive). The init method accepts
additional flags:
0,1,...,9 for the compression level (if not default)
huffman,filtered for the strategy (if not default)
Using this new zlib support, I'll finally be able to ditch Oz pickles
for ozmake packages and instead use the compressed version of my own
trivial pickle format.
The Open.compressedFile API is not yet complete. Comments and
suggestions are welcome.
Cheers,
-- Dr. Denys Duchier Équipe Calligramme LORIA, Nancy, FRANCE - Please send submissions to hackers@mozart-oz.org and administriva mail to hackers-request@mozart-oz.org. The Mozart Oz web site is at http://www.mozart-oz.org/.