Re: [Algorithms] Byte Swapping
Brought to you by:
vexxed72
From: Charles B. <cb...@cb...> - 2000-07-17 22:42:12
|
Jumping in late : I'm sure you don't need it now, but here's a crazy ANSI C byte-swapper : let x = a 32 bit ulong , ABCD then y = DCBA y = (x = x>>16 | x<<16) ^ (x = (x^x>>8) & 0x00FF00FF) ^ (x<<8); At 11:45 PM 7/15/2000 -0700, you wrote: >I can do the obvious method, but I was wondering if anyone have any >cool/fast code snippets for byte swapping integers and floats? > >Tom > > >_______________________________________________ >GDAlgorithms-list mailing list >GDA...@li... >http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > -------------------------------------- Charles Bloom www.cbloom.com |