private static int FastDecHexLen (int val) { if (val < 0x100) if (val < 0x10) return 1; else return 2; else if (val < 0x1000) return 3; else return 4; }