Login
User Name:

Password:



Register
Forgot your password?
LOP Building Guide v1.0
Author: Hanaisse
Submitted by: Hanaisse
Reset Guide
Author: Hanaisse
Submitted by: Hanaisse
LOP 1.38r2
Author: Remcon
Submitted by: Remcon
LOP 1.37
Author: Remcon
Submitted by: Remcon
LOP 1.36
Author: Remcon
Submitted by: Remcon
Yahoo! Slurp, Baiduspider

Members: 0
Guests: 4
Stats
Files
Topics
Posts
Members
Newest Member
369
3,185
15,632
526
Craty####
» SmaugMuds.org » General » Coding » z_stream definition?
Forum Rules | Mark all | Recent Posts

z_stream definition?
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jul 13, 2009, 11:52 am
Go to the bottom of the page Go to the top of the page
Tonitrus
Fledgling
GroupMembers
Posts47
JoinedJun 24, 2009

Where can I find a definition for the z_stream type?  I've googled it, tried man, man -k, I can't find it anywhere.  I can glean the names of the fields from grepping FUSS code a bit, but that doesn't tell me the datatypes for those fields.
       
Post is unread #2 Jul 13, 2009, 12:05 pm
Go to the bottom of the page Go to the top of the page


David Haley
Sorcerer
GroupMembers
Posts830
JoinedJan 29, 2007
WWW

It's part of zlib, I think, so you could probably look there (googling for zlib should suffice). .........................
David Haley
Head Coder, Legends of the Darkstone
BabbleMUD Project
http://david.the-haleys.org
       
Post is unread #3 Jul 13, 2009, 12:31 pm
Go to the bottom of the page Go to the top of the page
Tonitrus
Fledgling
GroupMembers
Posts47
JoinedJun 24, 2009

Aha, thanks, that did it. 

For the curious, here is the definition:
Code:
typedef struct z_stream_s {
    Bytef    *next_in;  /* next input byte */
    uInt     avail_in;  /* number of bytes available at next_in */
    uLong    total_in;  /* total nb of input bytes read so far */

    Bytef    *next_out; /* next output byte should be put there */
    uInt     avail_out; /* remaining free space at next_out */
    uLong    total_out; /* total nb of bytes output so far */

    char     *msg;      /* last error message, NULL if no error */
    struct internal_state FAR *state; /* not visible by applications */

    alloc_func zalloc;  /* used to allocate the internal state */
    free_func  zfree;   /* used to free the internal state */
    voidpf     opaque;  /* private data object passed to zalloc and zfree */

    int     data_type;  /* best guess about the data type: ascii or binary */
    uLong   adler;      /* adler32 value of the uncompressed data */
    uLong   reserved;   /* reserved for future use */
} z_stream ;
       
Pages:<< prev 1 next >>