Lines Matching defs:state

481 	struct private_data *state;
484 state = (struct private_data *)calloc(sizeof(*state), 1);
486 if (state == NULL || out_block == NULL) {
490 free(state);
494 self->data = state;
495 state->out_block_size = out_block_size;
496 state->out_block = out_block;
501 state->stream.avail_in = 0;
503 state->stream.next_out = state->out_block;
504 state->stream.avail_out = state->out_block_size;
506 state->crc32 = 0;
513 state->in_stream = 0;
516 state->in_stream = 1;
520 ret = lzma_stream_decoder(&(state->stream),
524 ret = lzma_alone_decoder(&(state->stream),
533 free(state->out_block);
534 free(state);
542 struct private_data *state;
550 state = (struct private_data *)self->data;
556 state->lzip_ver = h[4];
574 state->member_in = 6;
586 ret = lzma_raw_decoder(&(state->stream), filters);
598 struct private_data *state;
603 state = (struct private_data *)self->data;
604 if (state->lzip_ver == 0)
619 if (state->crc32 != archive_le32dec(f)) {
626 if ((uint64_t)state->member_out != archive_le64dec(f + 4)) {
633 if (state->lzip_ver == 1 &&
634 (uint64_t)state->member_in + tail != archive_le64dec(f + 12)) {
644 state->in_stream = 0;
645 state->crc32 = 0;
646 state->member_out = 0;
647 state->member_in = 0;
648 state->eof = 0;
659 struct private_data *state;
664 state = (struct private_data *)self->data;
667 state->stream.next_out = state->out_block;
668 state->stream.avail_out = state->out_block_size;
671 while (state->stream.avail_out > 0 && !state->eof) {
672 if (!state->in_stream) {
679 state->in_stream = 1;
681 state->stream.next_in =
683 if (state->stream.next_in == NULL && avail_in < 0) {
689 state->stream.avail_in = avail_in;
692 ret = lzma_code(&(state->stream),
693 (state->stream.avail_in == 0)? LZMA_FINISH: LZMA_RUN);
696 state->eof = 1;
700 avail_in - state->stream.avail_in);
701 state->member_in +=
702 avail_in - state->stream.avail_in;
710 decompressed = state->stream.next_out - state->out_block;
711 state->total_out += decompressed;
712 state->member_out += decompressed;
716 *p = state->out_block;
718 state->crc32 = lzma_crc32(state->out_block,
719 decompressed, state->crc32);
720 if (state->eof) {
736 struct private_data *state;
738 state = (struct private_data *)self->data;
739 lzma_end(&(state->stream));
740 free(state->out_block);
741 free(state);