Skip to content

Instantly share code, notes, and snippets.

@cosminpopescu14
Last active October 7, 2018 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosminpopescu14/ed9783a742015c456d56114b54b7e93d to your computer and use it in GitHub Desktop.
Save cosminpopescu14/ed9783a742015c456d56114b54b7e93d to your computer and use it in GitHub Desktop.
public static uint ConvertEndianess(uint data)
{
uint goodData = ((data & 0x000000FF) << 24) + ((data & 0x0000FF00) << 8) + ((data & 0x00FF0000) >> 8) + ((data & 0xFF000000) >> 24);
return goodData;
}
@cosminpopescu14
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment