diff --git a/thirdparty/SZ/sz/src/utility.c b/thirdparty/SZ/sz/src/utility.c
index be7b02e13b5f83b6137dc134fe94a0fbc2d1532d..680914ed77d43f661710ae81ffc474d09cdadc24 100644
--- a/thirdparty/SZ/sz/src/utility.c
+++ b/thirdparty/SZ/sz/src/utility.c
@@ -155,9 +155,15 @@ float calculate_delta_t(size_t size){
 
 int is_lossless_compressed_data(unsigned char* compressedBytes, size_t cmpSize)
 {
+#if ZSTD_VERSION_NUMBER >= 10300
 	int frameContentSize = ZSTD_getFrameContentSize(compressedBytes, cmpSize);
 	if(frameContentSize != ZSTD_CONTENTSIZE_ERROR)
 		return ZSTD_COMPRESSOR;
+#else
+	int frameContentSize = ZSTD_getDecompressedSize(compressedBytes, cmpSize);
+	if(frameContentSize == 0)
+		return ZSTD_COMPRESSOR;
+#endif
 	
 	int flag = isZlibFormat(compressedBytes[0], compressedBytes[1]);
 	if(flag)