diff --git a/include/SZ3/api/impl/SZDispatcher.hpp b/include/SZ3/api/impl/SZDispatcher.hpp index 085c4f03..87b4d1ff 100644 --- a/include/SZ3/api/impl/SZDispatcher.hpp +++ b/include/SZ3/api/impl/SZDispatcher.hpp @@ -40,9 +40,7 @@ size_t SZ_compress_dispatcher(Config &conf, const T *data, uchar *cmpData, size_ } catch (std::length_error &e) { if (std::string(e.what()) == SZ_ERROR_COMP_BUFFER_NOT_LARGE_ENOUGH) { isCmpCapSufficient = false; - printf( - "The buffer for compressed data is not large enough. Ideally, set it as 2X original data size.\n " - "SZ is downgraded to lossless mode.\n"); + printf("SZ is downgraded to lossless mode.\n"); } else { throw; } @@ -65,7 +63,7 @@ size_t SZ_compress_dispatcher(Config &conf, const T *data, uchar *cmpData, size_ if (zstdCmpSize < cmpSize) { conf.cmprAlgo = ALGO_LOSSLESS; if (zstdCmpSize > cmpCap) { - fprintf(stderr, SZ_ERROR_COMP_BUFFER_NOT_LARGE_ENOUGH); + fprintf(stderr, "%s\n", SZ_ERROR_COMP_BUFFER_NOT_LARGE_ENOUGH); throw std::length_error(SZ_ERROR_COMP_BUFFER_NOT_LARGE_ENOUGH); } memcpy(cmpData, zstdCmpData, zstdCmpSize); diff --git a/include/SZ3/lossless/Lossless_zstd.hpp b/include/SZ3/lossless/Lossless_zstd.hpp index d626e60f..d3e909b9 100644 --- a/include/SZ3/lossless/Lossless_zstd.hpp +++ b/include/SZ3/lossless/Lossless_zstd.hpp @@ -26,7 +26,7 @@ class Lossless_zstd : public concepts::LosslessInterface { size_t compress(const uchar *src, size_t srcLen, uchar *dst, size_t dstCap) override { write(srcLen, dst); if (dstCap < ZSTD_compressBound(srcLen)) { - fprintf(stderr, SZ_ERROR_COMP_BUFFER_NOT_LARGE_ENOUGH); + fprintf(stderr, "%s\n", SZ_ERROR_COMP_BUFFER_NOT_LARGE_ENOUGH); throw std::length_error(SZ_ERROR_COMP_BUFFER_NOT_LARGE_ENOUGH); } size_t dstLen = ZSTD_compress(dst, dstCap, src, srcLen, compression_level);