Lines Matching refs:decode

388     } decode;  member
457 ctx->decode.bufsize = BROTLI_DEFAULT_BUFSIZE; in bio_brotli_new()
458 ctx->decode.state = BrotliDecoderCreateInstance(brotli_alloc, brotli_free, NULL); in bio_brotli_new()
459 if (ctx->decode.state == NULL) in bio_brotli_new()
473 BrotliDecoderDestroyInstance(ctx->decode.state); in bio_brotli_new()
488 BrotliDecoderDestroyInstance(ctx->decode.state); in bio_brotli_free()
489 OPENSSL_free(ctx->decode.buf); in bio_brotli_free()
520 if (ctx->decode.buf == NULL) { in bio_brotli_read()
521 ctx->decode.buf = OPENSSL_malloc(ctx->decode.bufsize); in bio_brotli_read()
522 if (ctx->decode.buf == NULL) { in bio_brotli_read()
526 ctx->decode.next_in = ctx->decode.buf; in bio_brotli_read()
527 ctx->decode.avail_in = 0; in bio_brotli_read()
531 ctx->decode.next_out = (unsigned char *)out; in bio_brotli_read()
532 ctx->decode.avail_out = (size_t)outl; in bio_brotli_read()
535 while (ctx->decode.avail_in > 0 || BrotliDecoderHasMoreOutput(ctx->decode.state)) { in bio_brotli_read()
536 …bret = BrotliDecoderDecompressStream(ctx->decode.state, &ctx->decode.avail_in, (const uint8_t**)&c… in bio_brotli_read()
537 … &ctx->decode.avail_out, &ctx->decode.next_out, NULL); in bio_brotli_read()
540 … ERR_add_error_data(1, BrotliDecoderErrorString(BrotliDecoderGetErrorCode(ctx->decode.state))); in bio_brotli_read()
544 if (BrotliDecoderIsFinished(ctx->decode.state) || ctx->decode.avail_out == 0) in bio_brotli_read()
545 return (int)(outl - ctx->decode.avail_out); in bio_brotli_read()
549 if (BrotliDecoderIsFinished(ctx->decode.state)) in bio_brotli_read()
556 ret = BIO_read(next, ctx->decode.buf, ctx->decode.bufsize); in bio_brotli_read()
559 int tot = outl - ctx->decode.avail_out; in bio_brotli_read()
566 ctx->decode.avail_in = ret; in bio_brotli_read()
567 ctx->decode.next_in = ctx->decode.buf; in bio_brotli_read()
726 ibs = ctx->decode.bufsize; in bio_brotli_ctrl()
739 if (ibs > 0 && ibs != ctx->decode.bufsize) { in bio_brotli_ctrl()
741 if (ctx->decode.buf != NULL) { in bio_brotli_ctrl()
742 tmp = OPENSSL_realloc(ctx->decode.buf, ibs); in bio_brotli_ctrl()
745 ctx->decode.buf = tmp; in bio_brotli_ctrl()
747 ctx->decode.bufsize = ibs; in bio_brotli_ctrl()
777 if (!BrotliDecoderIsFinished(ctx->decode.state)) in bio_brotli_ctrl()