mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 04:07:02 -06:00
feature release
- you can open / crate .tar.zst files now - direct compressing of files with zstd works also - you can also open files compressed with pzstd - next version will do also threaded compression like pzstd does - zst files can be registred with 7-Zip ZS now - update to latest zstd dev release v1.0.1 - the About Box will give you a hint, that this 7-Zip is not the default one
This commit is contained in:
@@ -16,8 +16,7 @@ CDecoder::CDecoder():
|
||||
_buffInSize(ZSTD_DStreamInSize()),
|
||||
_buffOutSize(ZSTD_DStreamOutSize()*4),
|
||||
_processedIn(0),
|
||||
_processedOut(0),
|
||||
_propsWereSet(false)
|
||||
_processedOut(0)
|
||||
{
|
||||
_props.clear();
|
||||
}
|
||||
@@ -66,7 +65,6 @@ STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte * prop, UInt32 size)
|
||||
#endif
|
||||
|
||||
memcpy(&_props, pProps, sizeof (DProps));
|
||||
_propsWereSet = true;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -91,9 +89,6 @@ HRESULT CDecoder::CreateDecompressor()
|
||||
{
|
||||
size_t result;
|
||||
|
||||
if (!_propsWereSet)
|
||||
return E_FAIL;
|
||||
|
||||
if (!_dstream) {
|
||||
_dstream = ZSTD_createDStream();
|
||||
if (!_dstream)
|
||||
@@ -198,6 +193,13 @@ HRESULT CDecoder::CodeSpec(ISequentialInStream * inStream, ISequentialOutStream
|
||||
/* finished */
|
||||
if (input.pos == input.size)
|
||||
break;
|
||||
|
||||
/* end of frame */
|
||||
if (result == 0) {
|
||||
result = ZSTD_initDStream(_dstream);
|
||||
if (ZSTD_isError(result))
|
||||
return ErrorOut(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -266,6 +268,13 @@ STDMETHODIMP CDecoder::Read(void *data, UInt32 /*size*/, UInt32 *processedSize)
|
||||
/* finished */
|
||||
if (input.pos == input.size)
|
||||
break;
|
||||
|
||||
/* end of frame */
|
||||
if (result == 0) {
|
||||
result = ZSTD_initDStream(_dstream);
|
||||
if (ZSTD_isError(result))
|
||||
return ErrorOut(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,6 @@ class CDecoder:public ICompressCoder,
|
||||
CMyComPtr < ISequentialInStream > _inStream;
|
||||
|
||||
DProps _props;
|
||||
bool _propsWereSet;
|
||||
|
||||
ZSTD_DStream *_dstream;
|
||||
void *_buffIn;
|
||||
|
||||
Reference in New Issue
Block a user