---
name: "ms_gswap4"
section: "3"
platform: "linux"
package: "libmseed-doc"
version: "2.19.8-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ms_gswap4"
---

# ms\_gswap4(3)

Generalized, in-place byte swapping routines

## NAME

ms\_gswap - Generalized, in-place byte swapping routines

## SYNOPSIS

```
#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 );
```

## DESCRIPTION

These routines swap between LSBF (little-endian) and MSBF (big-endian) byte orders.  The specified quantities are swapped in-place.

The **ms\_gswap\*a** routines are provided for backwards compatibility, but should not be used in new code. They are aliases for the regular versions above.

## AUTHOR

```
Chad Trabant
IRIS Data Management Center
```
