ZFP Compressor/Decompressor is incorrect
Looking at UnitTestZFP.cxx
, we see that no traditional tests are performed, and instead, values are printed to std::cout
, e.g.
for (int i = 0; i < dynField.GetNumberOfValues(); i++)
{
std::cout << oport.Get(i) << " " << port.Get(i) << " " << oport.Get(i) - port.Get(i)
<< std::endl;
}
Since oport
is the decompressed field, we expect that oport.Get(i) - port.Get(i)
should be small relative to port.Get(i)
.
This is not the case:
283: 2.44929e-16 -0.1875 0.1875
283: 0.0492599 -0.0625 0.11176
283: 0.0984003 0.0625 0.0359003
283: 0.147302 0.1875 -0.0401983
283: 0.195845 0.5 -0.304155
283: 0.243914 0.5 -0.256086
283: 0.29139 0.5 -0.20861
283: 0.338158 0.5 -0.161842
283: 0.384106 1 -0.615894
283: 0.429121 1 -0.570879
283: 0.473094 1 -0.526906
283: 0.515918 1 -0.484082
283: 0.557489 1 -0.442511
283: 0.597707 1 -0.402293
283: 0.636474 1 -0.363526
283: 0.673696 1 -0.326304