vtkmetaio - compress/uncompress doesn't handle the last bytes properly when compress overflows.
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
MET_PerformCompression doesn't handle it properly when the compression output is larger then the input.
A test case is attached that compresses and uncompressed N bytes (N \in [1,300]) and checks the result. On one hand it uses a constant value for all N bytes, here N=1...4 fail. On the other hand the array is filled according to a[i] = char(i). Here all cases (N < 273) fail, i.e. the last output bytes are not correct. In all failed cases the "compressed" output was larger than the input.
I think this indicates that the output buffer overflow during compression is not handled correctly.
The attached test program writes out all failing comparisons. If an abitrary additional command line parameter is given, also some info about the successful test is written out. The according CMakeLists.txt is given as comment in the C++ file.