#include <libmseed.h> void ms_gswap2 ( void *data2 ); void ms_gswap3 ( void *data3 ); void ms_gswap4 ( void *data4 ); void ms_gswap8 ( void *data8 ); void ms_gswap2a ( void *data2 ); void ms_gswap4a ( void *data4 ); void ms_gswap8a ( void *data8 );
These routines swap between LSBF (little-endian) and MSBF (big-endian) byte orders. The specified quantities are swapped in-place. There are two versions of most routines: a generic one that works on quantities regardless of memory alignment (ms_gswap#) and one that works on memory aligned quantities (ms_gswap#a). The versions for memory aligned quantities are much faster than their generic versions, but the memory *must* be aligned. You have been warned. There is only a generic version for 3-byte quantities.
Chad Trabant IRIS Data Management Center
The man pages ms_gswap2(3), ms_gswap2a(3), ms_gswap3(3), ms_gswap4(3), ms_gswap4a(3), ms_gswap8(3) and ms_gswap8a(3) are aliases of ms_gswap(3).