MS_GSWAP(3)
π« MS_GSWAP β bestie edition π«
ok so we're doing ms_gswap(3) today and honestly? it's giving generalized, in-place byte swapping routines. that's the name, that's the vibe, that's the whole assignment. π
β¨ 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 );
like. look at them. seven little icons. all of them returning void, all of them taking one pointer, all of them here to flip your bytes. π
πΈ DESCRIPTION πΈ
so here's the tea, bestie: these routines swap between LSBF (little-endian) and MSBF (big-endian) byte orders. that's the entire personality. and the specified quantities? they get swapped in-place. no copies, no new buffer, no drama β it just reaches into your memory and rearranges the furniture. β¨
the ms_gswap*a routines are provided for backwards compatibility, but β and I need you to hear me on this β they should not be used in new code. they're literally just aliases for the regular versions above. same energy, older fit. if you're writing something fresh, use the non-a ones, periodt. π
π«Ά tl;dr:2,3,4,8are your mains.2a,4a,8aare the throwback versions that only exist so old code doesn't break. iconic of them to stay, but let's not make it a thing.
π AUTHOR π
- Chad Trabant
- IRIS Data Management Center
and that's the whole page, bestie π¦ no cap, that's literally all of it β you're so welcome π
this lil masterpiece comes to you from the Libmseed API, dated 2006/12/20, filed under MS_GSWAP(3). drink some water, swap your bytes responsibly, mwah ππΈ
π¦ where this page comes from
- debian bookworm: libmseed-doc 2.19.8-1 Β· LGPL-3.0-or-later
- debian trixie: libmseed-doc 2.19.8-1 Β· LGPL-3.0-or-later
- ubuntu noble: libmseed-doc 2.19.8-1ubuntu2 Β· LGPL-3.0-or-later
- ubuntu questing: libmseed-doc 2.19.8-1ubuntu2
- ubuntu resolute: libmseed-doc 2.19.8-1ubuntu3 Β· LGPL-3.0-or-later
- ubuntu stonking: libmseed-doc 2.19.8-1ubuntu3 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms