[mercury-users] zlib binding
Peter Hawkins
hawkinsp at cs.stanford.edu
Fri Dec 1 13:29:17 AEDT 2006
Hi...
I started an interface to the in-memory parts of zlib, but didn't
finish it since the project that needed it turned out to be a bad idea
(tabling, blech :-) )
I've attached what I have. It doesn't really fit your description but
it might be a start. It depends on a hacked up binary string module I
wrote.
Cheers,
Peter
On 11/30/06, Ondrej Bojar <obo at cuni.cz> wrote:
> Hi, everyone.
>
> I wonder if anybody has a zlib binding for Mercury ready, a replacement
> for io__open_input that would read gzipped files?
>
> Thanks, Ondrej.
>
> --
> Ondrej Bojar (mailto:obo at cuni.cz)
> http://www.cuni.cz/~obo
>
> --------------------------------------------------------------------------
> mercury-users mailing list
> Post messages to: mercury-users at csse.unimelb.edu.au
> Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
> Subscriptions: mercury-users-request at csse.unimelb.edu.au
> --------------------------------------------------------------------------
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gzip.m
Type: application/octet-stream
Size: 2478 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/users/attachments/20061130/e39a6a7c/attachment.obj>
-------------- next part --------------
/*-----------------------------------------------------------------------------
binstring.h
Peter Hawkins <hawkinsp at cs.stanford.edu>
Wed Sep 7 11:12:19 EST 2005
vim: ts=4 sw=4 et wm=0 tw=0
A string implementation that permits the use of arbitrary binary data
(unlike the string module in the standard library, which assumes all
strings are NULL-terminated and hence cannot contain NULLs).
C header file.
----------------------------------------------------------------------------*/
#ifndef _BINSTRING_H_
#define _BINSTRING_H_
typedef struct {
unsigned int length;
char *data;
} binstring_t;
/* Create a copy of data as a binstring */
binstring_t *make_binstring(const char *data, int len);
#endif /* _BINSTRING_H_ */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binstring.m
Type: application/octet-stream
Size: 12656 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/users/attachments/20061130/e39a6a7c/attachment-0001.obj>
More information about the users
mailing list