Can't create VDS handle to read from S3 if remote VDS compressed with WaveletNormalizeBlock method
Hello!
I ran into a problem trying to open remote VDS on S3 compressed using WaveletNormalizeBlock
method.
The problem description: I receive "illegal compression method" error trying to read from that VDS. It looks impossible to read from WaveletNormalizeBlock
-compressed VDS using VDSInfo or any other OpenVDS tool (e.g. slicedump sample), but I thought it is OK to use wavelet-compressed VDS just to read.
Moreover, such a VDS can't be read from even using OpenVDS+ library tools!
Surprisingly, if I use local file-based VDS with WaveletNormalizeBlock
compression, all works perfectly.
If it's important, I have uploaded such a VDS to S3 using OpenVDS+ utils (SEGYImport/VDSCopy).
As I can see in OpenVDS sources, the reason is that ParseVDSJson.cpp module serializes CompressionMethod::WaveletNormalizeBlock
enum to string as "WaveletNormalizeBlock"
inside std::string ToString(CompressionMethod compressionMethod)
function, but deserialize function CompressionMethod CompressionMethodFromJson(Json::Value const &jsonCompressionMethod)
has the following code:
static CompressionMethod CompressionMethodFromJson(Json::Value const &jsonCompressionMethod) {
std::string compressionMethodString = jsonCompressionMethod.asString();
...
else if(compressionMethodString == "WaveletNormalizeBlockExperimental") // NOTE THIS
{
return CompressionMethod::WaveletNormalizeBlock;
}
...
else
{
throw Json::Exception("Illegal compression method");
}
}
So strings don't match each other ("WaveletNormalizeBlock"
!= "WaveletNormalizeBlockExperimental"
) and we run into exception.
My question is: isn't this is a bug/typo in source code and can it be fixed? (for OpenVDS+ release too, if I may ask)
Or if this is intended behavior, can you please reveal the reason behind this logic?