driver can only update length msg->produced = msg->req.dst_len - strm.avail_out; msg->in_cons = msg->req.src_len; status is decided by caller
// not sure about this patch, with this patch, compress and decompress are both OK
./sample/uadk_comp --lib /tmp/build/lib/libhisi_zlib.so --drv hisi_zlib --optype 0 --alg gzip <Makefile >out ./sample/uadk_comp --lib /tmp/build/lib/libhisi_zlib.so --drv hisi_zlib --optype 1 --alg gzip <out >dst vimdiff Makefile dst
Signed-off-by: Zhangfei Gao zhangfei.gao@linaro.org --- wd_comp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wd_comp.c b/wd_comp.c index ad9e006..ef6cc7f 100644 --- a/wd_comp.c +++ b/wd_comp.c @@ -795,7 +795,7 @@ static void wd_do_comp_strm_end_check(struct wd_comp_sess *sess, req->src_len == src_len) sess->stream_pos = WD_COMP_STREAM_NEW; else if (req->op_type == WD_DIR_DECOMPRESS && - req->status == WD_STREAM_END) + req->src_len == src_len) sess->stream_pos = WD_COMP_STREAM_NEW; }