Lines Matching refs:state
141 struct zstd_state *state = OPENSSL_zalloc(sizeof(*state)); in zstd_stateful_init() local
143 if (state == NULL) in zstd_stateful_init()
147 state->compressor = ZSTD_createCStream(); in zstd_stateful_init()
149 state->compressor = ZSTD_createCStream_advanced(zstd_mem_funcs); in zstd_stateful_init()
151 if (state->compressor == NULL) in zstd_stateful_init()
153 ZSTD_initCStream(state->compressor, ZSTD_CLEVEL_DEFAULT); in zstd_stateful_init()
156 state->decompressor = ZSTD_createDStream(); in zstd_stateful_init()
158 state->decompressor = ZSTD_createDStream_advanced(zstd_mem_funcs); in zstd_stateful_init()
160 if (state->decompressor == NULL) in zstd_stateful_init()
162 ZSTD_initDStream(state->decompressor); in zstd_stateful_init()
164 ctx->data = state; in zstd_stateful_init()
167 ZSTD_freeCStream(state->compressor); in zstd_stateful_init()
168 ZSTD_freeDStream(state->decompressor); in zstd_stateful_init()
169 OPENSSL_free(state); in zstd_stateful_init()
175 struct zstd_state *state = ctx->data; in zstd_stateful_finish() local
177 if (state != NULL) { in zstd_stateful_finish()
178 ZSTD_freeCStream(state->compressor); in zstd_stateful_finish()
179 ZSTD_freeDStream(state->decompressor); in zstd_stateful_finish()
180 OPENSSL_free(state); in zstd_stateful_finish()
193 struct zstd_state *state = ctx->data; in zstd_stateful_compress_block() local
202 if (state == NULL) in zstd_stateful_compress_block()
207 ret = ZSTD_endStream(state->compressor, &outbuf); in zstd_stateful_compress_block()
221 ret = ZSTD_compressStream2(state->compressor, &outbuf, &inbuf, ZSTD_e_continue); in zstd_stateful_compress_block()
231 ret = ZSTD_flushStream(state->compressor, &outbuf); in zstd_stateful_compress_block()
252 struct zstd_state *state = ctx->data; in zstd_stateful_expand_block() local
261 if (state == NULL) in zstd_stateful_expand_block()
268 ret = ZSTD_decompressStream(state->decompressor, &outbuf, &inbuf); in zstd_stateful_expand_block()
457 ZSTD_DStream *state; member
463 ZSTD_CStream *state; member
525 ctx->decompress.state = ZSTD_createDStream(); in bio_zstd_new()
527 ctx->decompress.state = ZSTD_createDStream_advanced(zstd_mem_funcs); in bio_zstd_new()
529 if (ctx->decompress.state == NULL) in bio_zstd_new()
531 ZSTD_initDStream(ctx->decompress.state); in bio_zstd_new()
535 ctx->compress.state = ZSTD_createCStream(); in bio_zstd_new()
537 ctx->compress.state = ZSTD_createCStream_advanced(zstd_mem_funcs); in bio_zstd_new()
539 if (ctx->compress.state == NULL) in bio_zstd_new()
541 ZSTD_initCStream(ctx->compress.state, ZSTD_CLEVEL_DEFAULT); in bio_zstd_new()
550 ZSTD_freeDStream(ctx->decompress.state); in bio_zstd_new()
551 ZSTD_freeCStream(ctx->compress.state); in bio_zstd_new()
565 ZSTD_freeDStream(ctx->decompress.state); in bio_zstd_free()
567 ZSTD_freeCStream(ctx->compress.state); in bio_zstd_free()
608 zret = ZSTD_decompressStream(ctx->decompress.state, &outBuf, &ctx->decompress.inbuf); in bio_zstd_read()
687 zret = ZSTD_compressStream2(ctx->compress.state, &ctx->compress.outbuf, &inBuf, ZSTD_e_end); in bio_zstd_write()
733 zret = ZSTD_flushStream(ctx->compress.state, &ctx->compress.outbuf); in bio_zstd_flush()