uppsrc: docs & removed #ifdef MTs

git-svn-id: svn://ultimatepp.org/upp/trunk@13925 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-01-21 10:05:16 +00:00
parent 8005b4dfde
commit 58e0fdebaf
22 changed files with 49 additions and 132 deletions

View file

@ -7,10 +7,8 @@ void sCompressStreamCopy_(Stream& out, Stream& in, Gate<int64, int64> progress,
static int64 sZstdCompress(Stream& out, Stream& in, int64 size, Gate<int64, int64> progress, bool co)
{
ZstdCompressStream outs(out);
#ifdef _MULTITHREADED
if(co)
outs.Co();
#endif
sCompressStreamCopy_(outs, in, progress, in, size);
outs.Close();
if(!out.IsError() && !outs.IsError())
@ -21,10 +19,8 @@ static int64 sZstdCompress(Stream& out, Stream& in, int64 size, Gate<int64, int6
static int64 sZstdDecompress(Stream& out, Stream& in, int64 size, Gate<int64, int64> progress, bool co)
{
ZstdDecompressStream ins(in);
#ifdef _MULTITHREADED
if(co)
ins.Co();
#endif
sCompressStreamCopy_(out, ins, progress, in, size);
ins.Close();
if(!out.IsError() && !ins.IsError())
@ -66,8 +62,6 @@ String ZstdDecompress(const String& s, Gate<int64, int64> progress)
return ZstdDecompress(~s, s.GetLength(), progress);
}
#ifdef _MULTITHREADED
int64 CoZstdCompress(Stream& out, Stream& in, Gate<int64, int64> progress)
{
return sZstdCompress(out, in, in.GetLeft(), progress, true);
@ -102,6 +96,4 @@ String CoZstdDecompress(const String& s, Gate<int64, int64> progress)
return CoZstdDecompress(~s, s.GetLength(), progress);
}
#endif
};