Before that commit all SEGY file were supposed to be BIG endian and the host machine is LITTLE endian.
It weren't working with LITTLE endian SEGY on LITTLE endian machine.
Now the endianness of machine is cheked using Base.ENDIAN_BOM value and SEGY endian is checked using 3225-3226 file binare header value (Data Sample Format code) wich is supposed to be in range 1-16 (from the SEGY Revision).
The most importnat here is the function bswap_needed(s::IO) that checks whether swap bytes is needed or not.
It is important that s::IO was opened from the beginning of the file.
That is thrue when reading file_header but this is not true when reading traces or trace_headers.
That is why swap_bytes argument for these functions doesn't have default value.
Also bigendian::Bool argument for some functions was renamed to swap_bytes::Bool.
I locally checked the correctness of reading and scanning IEEE little/big endian SEGY and IBMFLOAT32 big endian SEGY on my LITTLE endian machine and it is working correctly.
Before that commit all SEGY file were supposed to be BIG endian and the host machine is LITTLE endian. It weren't working with LITTLE endian SEGY on LITTLE endian machine.
Now the endianness of machine is cheked using Base.ENDIAN_BOM value and SEGY endian is checked using 3225-3226 file binare header value (Data Sample Format code) wich is supposed to be in range 1-16 (from the SEGY Revision).
The most importnat here is the function
bswap_needed(s::IO)
that checks whether swap bytes is needed or not. It is important thats::IO
was opened from the beginning of the file. That is thrue when readingfile_header
but this is not true when reading traces or trace_headers. That is whyswap_bytes
argument for these functions doesn't have default value.Also
bigendian::Bool
argument for some functions was renamed toswap_bytes::Bool
.I locally checked the correctness of reading and scanning IEEE little/big endian SEGY and IBMFLOAT32 big endian SEGY on my LITTLE endian machine and it is working correctly.