function decode(data, encoding, compression) {
	compression = compression || "none";
	encoding = encoding || "none";

	switch (encoding) {
		case "csv":
			return decodeCSV(data);

		case "base64":
			if (compression !== "none") {
				data = decompress(data, compression);
			} else {
				data = decodeBase64AsArray(data, 4);
			}
			return data;

		case "none":
			return data;

		case "xml":
			throw new Error("XML encoding is deprecated, use base64 instead");

		default:
			throw new Error("Unknown layer encoding: " + encoding);
	}
}
Decode a encoded array into a binary array
@memberof TMXUtils
@param {string} data - data to be decoded
@param {string} [encoding="none"] - data encoding ("csv", "base64", "xml")
@returns {number[]} Decoded data