Closed LafeWessel closed 1 year ago
@LafeWessel Sorry for the late reply. Thanks again for reporting the issue!
There are many cases where we need to read from the middle of a file, as in the case you reported, but by mistake, I had stored the offset as zero internally at the start of the read.
The problem has been fixed in my local environment. I will merge it later.
Simple Description on the Bug
When attempting to read the next message based on starting reading a GRIB file from an offset, the code panics instead of parsing the values even though it can correctly read the section information.
Steps to Reproduce
Here is the test I ran with the test file found here. Attempting to use other offsets that are found in the GRIB index file (second value, delimited by
:
) will produce similar results, sometimes on the first message instead of the second. Starting from an offset of 0 allows the reader to read the file normally with no errors encountered.Expected Behavior
The message offset-to and each following message are properly parsed.
Actual Behavior
When testing on the test file that I mentioned above, the decoder can properly handle all the submessages in the GRIB file. However, when attempting to start from an offset in the file greater than 0, the decoder returns a
ComplexDecodingError
for the second message.Additional Context
No response