We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d655ae2 commit a7d5961Copy full SHA for a7d5961
zstd.c
@@ -683,19 +683,10 @@ ZEND_FUNCTION(zstd_uncompress_init)
683
{
684
PHP_ZSTD_CONTEXT_OBJ_INIT_OF_CLASS(php_zstd_uncompress_context_ce);
685
686
- ctx->dctx = ZSTD_createDCtx();
687
- if (ctx->dctx == NULL) {
+ if (php_zstd_context_create_decompress(ctx, NULL) != SUCCESS) {
688
zval_ptr_dtor(return_value);
689
- ZSTD_WARNING("failed to create uncompress context");
690
RETURN_FALSE;
691
}
692
- ctx->cdict = NULL;
693
-
694
- ZSTD_DCtx_reset(ctx->dctx, ZSTD_reset_session_only);
695
696
- ctx->output.size = ZSTD_DStreamOutSize();
697
- ctx->output.dst = emalloc(ctx->output.size);
698
- ctx->output.pos = 0;
699
700
701
ZEND_FUNCTION(zstd_uncompress_add)
0 commit comments