• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/powerpc/boot/

Lines Matching defs:state

25  * @state:     decompressor state structure to be initialized
31 * state in @state. The other functions in this file can then be used
36 * in @state and the other functions in this file will simply copy
42 void gunzip_start(struct gunzip_state *state, void *src, int srclen)
47 memset(state, 0, sizeof(*state));
54 state->s.workspace = state->scratch;
55 if (zlib_inflate_workspacesize() > sizeof(state->scratch))
76 r = zlib_inflateInit2(&state->s, -MAX_WBITS);
81 state->s.total_in = hdrlen;
82 state->s.next_in = src + hdrlen;
83 state->s.avail_in = srclen - hdrlen;
88 * @state: gzip state structure previously initialized by gunzip_start()
93 * previously associated with @state by gunzip_start(), decompressing
102 int gunzip_partial(struct gunzip_state *state, void *dst, int dstlen)
106 if (state->s.workspace) {
110 state->s.next_out = dst;
111 state->s.avail_out = dstlen;
112 r = zlib_inflate(&state->s, Z_FULL_FLUSH);
114 fatal("inflate returned %d msg: %s\n\r", r, state->s.msg);
115 len = state->s.next_out - (unsigned char *)dst;
118 len = min(state->s.avail_in, (unsigned)dstlen);
119 memcpy(dst, state->s.next_in, len);
120 state->s.next_in += len;
121 state->s.avail_in -= len;
128 * @state: gzip state structure previously initialized by gunzip_start()
133 * previously associated with @state by gunzip_start(), decompressing
140 void gunzip_exactly(struct gunzip_state *state, void *dst, int dstlen)
144 len = gunzip_partial(state, dst, dstlen);
152 * @state: gzip state structure previously initialized by gunzip_start()
156 * data stream previously associated with @state by gunzip_start().
165 void gunzip_discard(struct gunzip_state *state, int len)
170 gunzip_exactly(state, discard_buf, sizeof(discard_buf));
175 gunzip_exactly(state, discard_buf, len);
180 * @state: gzip state structure previously initialized by gunzip_start()
185 * bytes, from the stream previously associated with @state by
187 * any of the functions in this file on @state until it is
193 int gunzip_finish(struct gunzip_state *state, void *dst, int dstlen)
197 len = gunzip_partial(state, dst, dstlen);
199 if (state->s.workspace) {
200 zlib_inflateEnd(&state->s);