Disambiguate pledgedSrcSize == 0

- Modify ZSTD CLI to only set contentSizeFlag if it _knows_ the size
- Change pzstd to stop setting contentSizeFlag without accurate pledgedSrcSize
This commit is contained in:
Sean Purcell committed 2017-02-08 15:12:46 -08:00
1 parent ba2ad9f25c
commit 0f5c95af44
5 files changed
+16 -9

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@ struct Options {
ZSTD_parameters determineParameters() const {
ZSTD_parameters params = ZSTD_getParams(compressionLevel, 0, 0);
params.fParams.contentSizeFlag = 1;
params.fParams.contentSizeFlag = 0;
params.fParams.checksumFlag = checksum;
if (maxWindowLog != 0 && params.cParams.windowLog > maxWindowLog) {
params.cParams.windowLog = maxWindowLog;