Closed anthonytorlucci closed 1 year ago
Excerpt from discussion on Slack
segyio exposes the buffer as big-endian always so consumers can read without checking if they need to swap It's on purpose to support custom header parsing, but I think it's a bad design because if you do custom parsing it is likely your fields do not align with the spec
Is the raw bytes
buf
variable always big endian regardless of the byteorder of the input segy data?I've created an example segy_header_buf to illustrate the issue.
The example below works as expected when the input is big endian byteorder.
However, when the input segy is little endian (and switching the signs in the unpacking) the output is not correct.