diff --git a/CPP/7zip/Compress/ZstdEncoder.cpp b/CPP/7zip/Compress/ZstdEncoder.cpp index 8f9eae88a..7bdfc5f8a 100644 --- a/CPP/7zip/Compress/ZstdEncoder.cpp +++ b/CPP/7zip/Compress/ZstdEncoder.cpp @@ -227,6 +227,9 @@ STDMETHODIMP CEncoder::Code(ISequentialInStream *inStream, ZSTD_inBuffer inBuff; size_t err, srcSize; + _processedIn = 0; + _processedOut = 0; + if (!_ctx) { _ctx = ZSTD_createCCtx(); if (!_ctx)