63: for(unsigned int i = 0; i < width; ++i)
64: var |= ((T)data.at(i) << (8 * ((width - 1) - i)));
is already converting big endian into little endian, so an additional convertion in all arrays classes:
byte_stream stream(byte_stream::SWAP_ENDIAN);
bring the big endian back.
A quick try:
63: for(unsigned int i = 0; i < width; ++i)
64: var |= ((T)data.at(i) << (8 * i));
leads to "unknown_tag".
A quick and dirty solution is a removal of all
byte_stream stream(byte_stream::SWAP_ENDIAN);
calls in the tag/ classes.
I believe, the library is handling the big endian logic incorrectly.
read file r.-2.-1.mca, chunk 0,0
set a breakpoint in region_file_reader line 312
debug the code till byte_stream line 63
array data has the following content (hexadecimal)
[0]=11, [1]=88, [2]=a4, [3]=52, [4]=29, [5]=10, [6]=88, [7]=43
print data by calling "get_data"
OCEAN_FLOOR [LONG ARRAY] : Size 36 : 11 88 A4 52 29 10 88 43 ...
expected is:OCEAN_FLOOR [LONG ARRAY] : Size 36 : 43 88 10 29 52 A4 88 11 ...
POSSIBLE REASON:
is already converting big endian into little endian, so an additional convertion in all arrays classes:
byte_stream stream(byte_stream::SWAP_ENDIAN);
bring the big endian back.A quick try:
leads to "unknown_tag".
A quick and dirty solution is a removal of all
byte_stream stream(byte_stream::SWAP_ENDIAN);
calls in the tag/ classes.PS: r.-2.-1.mca.zip