Commit 1f799c26 authored by Hal Finkel's avatar Hal Finkel
Browse files

make new version of SZ compile with older zstd

parent 03ba2823
...@@ -155,9 +155,15 @@ float calculate_delta_t(size_t size){ ...@@ -155,9 +155,15 @@ float calculate_delta_t(size_t size){
int is_lossless_compressed_data(unsigned char* compressedBytes, size_t cmpSize) int is_lossless_compressed_data(unsigned char* compressedBytes, size_t cmpSize)
{ {
#if ZSTD_VERSION_NUMBER >= 10300
int frameContentSize = ZSTD_getFrameContentSize(compressedBytes, cmpSize); int frameContentSize = ZSTD_getFrameContentSize(compressedBytes, cmpSize);
if(frameContentSize != ZSTD_CONTENTSIZE_ERROR) if(frameContentSize != ZSTD_CONTENTSIZE_ERROR)
return ZSTD_COMPRESSOR; return ZSTD_COMPRESSOR;
#else
int frameContentSize = ZSTD_getDecompressedSize(compressedBytes, cmpSize);
if(frameContentSize == 0)
return ZSTD_COMPRESSOR;
#endif
int flag = isZlibFormat(compressedBytes[0], compressedBytes[1]); int flag = isZlibFormat(compressedBytes[0], compressedBytes[1]);
if(flag) if(flag)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment