Lines Matching defs:state
169 struct private_data *state;
177 state = (struct private_data *)calloc(sizeof(*state), 1);
181 if (state == NULL || out_block == NULL || dstream == NULL) {
183 free(state);
190 self->data = state;
192 state->out_block_size = out_block_size;
193 state->out_block = out_block;
194 state->dstream = dstream;
199 state->eof = 0;
200 state->in_frame = 0;
208 struct private_data *state;
214 state = (struct private_data *)self->data;
216 out = (ZSTD_outBuffer) { state->out_block, state->out_block_size, 0 };
219 while (out.pos < out.size && !state->eof) {
220 if (!state->in_frame) {
221 const size_t ret = ZSTD_initDStream(state->dstream);
236 if (!state->in_frame) {
238 state->eof = 1;
252 ZSTD_decompressStream(state->dstream, &out, &in);
266 state->in_frame = (ret != 0);
271 state->total_out += decompressed;
275 *p = state->out_block;
285 struct private_data *state;
287 state = (struct private_data *)self->data;
289 ZSTD_freeDStream(state->dstream);
290 free(state->out_block);
291 free(state);