.TH GSWAP 3 2004/11/22 "Libmseed API"
.SH DESCRIPTION
Generalized, in-place byte swapping routines

.SH SYNOPSIS
.nf
.B #include <libmseed.h>

.BI "void  \fBgswap2\fP ( void *" data2 " );"

.BI "void  \fBgswap3\fP ( void *" data3 " );"

.BI "void  \fBgswap4\fP ( void *" data4 " );"

.BI "void  \fBgswap8\fP ( void *" data8 " );"

.BI "void  \fBgswap2a\fP ( void *" data2 " );"

.BI "void  \fBgswap4a\fP ( void *" data4 " );"

.BI "void  \fBgswap8a\fP ( void *" data8 " );"
.fi

.SH DESCRIPTION
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 (gswap#) and one that works
on memory aligned quantities (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.

.SH AUTHOR
.nf
Chad Trabant
IRIS Data Management Center
.fi
