public static void packMessage(String message, Stream buffer) { // method526
		if (message.length() > 80) {
			message = message.substring(0, 80);
		}
		message = message.toLowerCase();
		int tmp = -1;
		for (int i = 0; i < message.length(); i++) {
			char c = message.charAt(i);
			int k = 0;
			for (int j = 0; j < PlayerInput.VALID_CHARACTERS.length; j++) {
				if (c != PlayerInput.VALID_CHARACTERS[j]) {
					continue;
				}
				k = j;
				break;
			}
			if (k > 12) {
				k += 195;
			}
			if (tmp == -1) {
				if (k < 13) {
					tmp = k;
				} else {
					buffer.writeByte(k);
				}
			} else if (k < 13) {
				buffer.writeByte((tmp << 4) + k);
				tmp = -1;
			} else {
				buffer.writeByte((tmp << 4) + (k >> 4));
				tmp = k & 0xf;
			}
		}
		if (tmp != -1) {
			buffer.writeByte(tmp << 4);
		}
	}