From 22c1c0ab83722738d72a1c66e10ab38071687a64 Mon Sep 17 00:00:00 2001 From: Hal Finkel <hfinkel@anl.gov> Date: Mon, 29 Oct 2018 16:33:25 -0500 Subject: [PATCH] Allow Blosc to increase the size over the sz output (only a little bit, hopefully) --- GenericIO.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GenericIO.cxx b/GenericIO.cxx index bc6ccec..83702c3 100644 --- a/GenericIO.cxx +++ b/GenericIO.cxx @@ -608,10 +608,11 @@ nosz: } #endif - LocalCData[i].resize(LocalCData[i].size() + OrigDataSize); + size_t RealOrigDataSize = NElems*Vars[i].Size; + LocalCData[i].resize(LocalCData[i].size() + RealOrigDataSize); if (blosc_compress(9, 1, OrigUnitSize, OrigDataSize, OrigData, &LocalCData[i][0] + sizeof(CompressHeader<IsBigEndian>), - OrigDataSize) <= 0) { + RealOrigDataSize) <= 0) { if (FreeOrigData) free(OrigData); -- GitLab