removed previous version of completion for compression
This commit is contained in:
parent
5a85c57e30
commit
6945b3c43d
@ -140,9 +140,6 @@ struct ZSTD_CCtx_s {
|
|||||||
/* Multi-threading */
|
/* Multi-threading */
|
||||||
U32 nbThreads;
|
U32 nbThreads;
|
||||||
ZSTDMT_CCtx* mtctx;
|
ZSTDMT_CCtx* mtctx;
|
||||||
|
|
||||||
/* adaptive compression */
|
|
||||||
double completion;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -2848,7 +2845,6 @@ static size_t ZSTD_compress_frameChunk (ZSTD_CCtx* cctx,
|
|||||||
BYTE* op = ostart;
|
BYTE* op = ostart;
|
||||||
U32 const maxDist = 1 << cctx->appliedParams.cParams.windowLog;
|
U32 const maxDist = 1 << cctx->appliedParams.cParams.windowLog;
|
||||||
|
|
||||||
cctx->completion = 0;
|
|
||||||
if (cctx->appliedParams.fParams.checksumFlag && srcSize)
|
if (cctx->appliedParams.fParams.checksumFlag && srcSize)
|
||||||
XXH64_update(&cctx->xxhState, src, srcSize);
|
XXH64_update(&cctx->xxhState, src, srcSize);
|
||||||
|
|
||||||
@ -2899,7 +2895,6 @@ static size_t ZSTD_compress_frameChunk (ZSTD_CCtx* cctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
remaining -= blockSize;
|
remaining -= blockSize;
|
||||||
cctx->completion = 1 - (double)remaining/srcSize;
|
|
||||||
dstCapacity -= cSize;
|
dstCapacity -= cSize;
|
||||||
ip += blockSize;
|
ip += blockSize;
|
||||||
op += cSize;
|
op += cSize;
|
||||||
@ -3002,11 +2997,6 @@ static size_t ZSTD_compressContinue_internal (ZSTD_CCtx* cctx,
|
|||||||
return fhSize;
|
return fhSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZSTDLIB_API double ZSTD_getCompletion(ZSTD_CCtx* cctx)
|
|
||||||
{
|
|
||||||
return cctx->completion;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t ZSTD_compressContinue (ZSTD_CCtx* cctx,
|
size_t ZSTD_compressContinue (ZSTD_CCtx* cctx,
|
||||||
void* dst, size_t dstCapacity,
|
void* dst, size_t dstCapacity,
|
||||||
const void* src, size_t srcSize)
|
const void* src, size_t srcSize)
|
||||||
|
@ -808,11 +808,6 @@ ZSTDLIB_API size_t ZSTD_copyCCtx(ZSTD_CCtx* cctx, const ZSTD_CCtx* preparedCCtx,
|
|||||||
ZSTDLIB_API size_t ZSTD_compressContinue(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
|
ZSTDLIB_API size_t ZSTD_compressContinue(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
|
||||||
ZSTDLIB_API size_t ZSTD_compressEnd(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
|
ZSTDLIB_API size_t ZSTD_compressEnd(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
|
||||||
|
|
||||||
/*! ZSTD_getCompletion: get a double representing how much of a file/buffer has been compressed
|
|
||||||
* using ZSTD_compressContinue()
|
|
||||||
* return: a double value in the range of 0 to 1 representing how much a compression job has finished
|
|
||||||
*/
|
|
||||||
ZSTDLIB_API double ZSTD_getCompletion(ZSTD_CCtx* cctx);
|
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
Buffer-less streaming decompression (synchronous mode)
|
Buffer-less streaming decompression (synchronous mode)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user