Skip to content

Instantly share code, notes, and snippets.

@ThePhD
Created December 23, 2013 03:35
Show Gist options
  • Save ThePhD/8091329 to your computer and use it in GitHub Desktop.
Save ThePhD/8091329 to your computer and use it in GitHub Desktop.
public class Endian {
public static readonly Endian Big = new Endian {
n20 = 1,
n21 = 0,
n40 = 3,
n41 = 2,
n42 = 1,
n43 = 0,
n80 = 7,
n81 = 6,
n82 = 5,
n83 = 4,
n84 = 3,
n85 = 2,
n86 = 1,
n87 = 0
};
public static readonly Endian Little = new Endian {
n20 = 0,
n21 = 1,
n40 = 0,
n41 = 1,
n42 = 2,
n43 = 3,
n80 = 0,
n81 = 1,
n82 = 2,
n83 = 3,
n84 = 4,
n85 = 5,
n86 = 6,
n87 = 7
};
public static readonly Endian System = BitConverter.IsLittleEndian ? Little : Big;
public int n20;
public int n21;
public int n40;
public int n41;
public int n42;
public int n43;
public int n80;
public int n81;
public int n82;
public int n83;
public int n84;
public int n85;
public int n86;
public int n87;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment