Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function endian_swap_ushort( &$x )
- {
- $x = ( $x >> 8 ) |
- ( $x << 8 );
- }
- function endian_swap_uint( &$x )
- {
- $x = ( $x>>24 ) |
- ( ( $x << 8 ) & 0x00FF0000 ) |
- ( ( $x >> 8 ) & 0x0000FF00 ) |
- ( $x << 24 );
- }
- function endian_swap_ulong( &$x )
- {
- $x = ( $x >> 56 ) |
- ( ( $x << 40 ) & 0x00FF000000000000 ) |
- ( ( $x << 24 ) & 0x0000FF0000000000 ) |
- ( ( $x << 8 ) & 0x000000FF00000000 ) |
- ( ( $x >> 8 ) & 0x00000000FF000000 ) |
- ( ( $x >> 24 ) & 0x0000000000FF0000 ) |
- ( ( $x >> 40 ) & 0x000000000000FF00 ) |
- ( $x << 56 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement