Revert "Revert "Brought up-to-date with transcoder changes""

This reverts commit ff531b24676a548683f74a01608f71c38a8776f9.
diff --git a/contrib/single_file_transcoder/README.md b/contrib/single_file_transcoder/README.md
index 8f7e1a8..9923dd6 100644
--- a/contrib/single_file_transcoder/README.md
+++ b/contrib/single_file_transcoder/README.md
@@ -22,4 +22,4 @@
 
 Because all it now takes to support Basis Universal is the addition of a single file, two if using the header, with no configuration or further build steps (the out-of-the-box defaults tailor the included formats for various platforms). 
 
-The library is small, adding, for example, 249kB to an Emscripten compiled WebAssembly project (with transcoding disabled for BC7 and ATC; disabling ASTC will remove a further 64kB, and `gzip` will approximately half the `wasm` file).
+The library is small, adding, for example, around 250kB to an Emscripten compiled WebAssembly project (with transcoding disabled for BC7 and ATC; disabling ASTC will remove a further 64kB, and `gzip` will approximately half the `wasm` file).
diff --git a/contrib/single_file_transcoder/basisutranslib-in.cpp b/contrib/single_file_transcoder/basisutranslib-in.cpp
index 783df8c..43fe0fd 100644
--- a/contrib/single_file_transcoder/basisutranslib-in.cpp
+++ b/contrib/single_file_transcoder/basisutranslib-in.cpp
@@ -10,24 +10,28 @@
 
 /*
  * Transcoder build options for known platforms (iOS has ETC, ASTC and PVRTC;
- * Emscripten and Android are the same as iOS plus DXT; other platforms build
- * all except BC7 mode 6).
+ * Emscripten adds DXT to iOS's options; Android adds PVRTC2 to Emscripten's
+ * options; other platforms build all except BC7 mode 6 and FXT1).
  * 
  * See https://github.com/BinomialLLC/basis_universal#shrinking-the-transcoders-compiled-size
  */
 #ifdef __APPLE__
-#include <TargetConditionals.h>
+	#include <TargetConditionals.h>
 #endif
 #if TARGET_OS_IPHONE
-#define BASISD_SUPPORT_DXT1  0
-#define BASISD_SUPPORT_DXT5A 0
+	#define BASISD_SUPPORT_DXT1  0
+	#define BASISD_SUPPORT_DXT5A 0
 #endif
 #if TARGET_OS_IPHONE || defined(__EMSCRIPTEN__) || defined(__ANDROID__)
-#define BASISD_SUPPORT_BC7 0
-#define BASISD_SUPPORT_ATC 0
+	#define BASISD_SUPPORT_BC7 0
+	#define BASISD_SUPPORT_ATC 0
+	#ifndef __ANDROID__
+		#define BASISD_SUPPORT_PVRTC2 0
+	#endif
 #else
-#define BASISD_SUPPORT_BC7_MODE6_OPAQUE_ONLY 0
+	#define BASISD_SUPPORT_BC7_MODE6_OPAQUE_ONLY 0
 #endif
+#define BASISD_SUPPORT_FXT1 0
 
 #include "basisu_transcoder.cpp"
 
@@ -56,7 +60,7 @@
 	BASISU_NOTE_UNUSED(basist::MAX_SELECTOR_HISTORY_BUF_SIZE);
 #if BASISD_SUPPORT_ETC2_EAC_A8
 	// Unused but only when building with EAC
-	BASISU_NOTE_UNUSED(basist::g_eac_a8_modifier_table);
+	BASISU_NOTE_UNUSED(basist::g_eac_modifier_table);
 #endif
 #if BASISD_SUPPORT_PVRTC1
 	// Unused but only when building with PVRTC
diff --git a/contrib/single_file_transcoder/examples/emscripten.cpp b/contrib/single_file_transcoder/examples/emscripten.cpp
index c04dd3a..eaf519c 100644
--- a/contrib/single_file_transcoder/examples/emscripten.cpp
+++ b/contrib/single_file_transcoder/examples/emscripten.cpp
@@ -5,7 +5,7 @@
  * \n
  * Compile using:
  * \code
- *	export CC_FLAGS="-Wall -Wextra -Werror -Os -g0 -flto --llvm-lto 3 -fno-exceptions -fno-rtti -lGL -DNDEBUG=1"
+ *	export CC_FLAGS="-std=c++11 -Wall -Wextra -Werror -Os -g0 -flto --llvm-lto 3 -fno-exceptions -fno-rtti -lGL -DNDEBUG=1"
  *	export EM_FLAGS="-s ENVIRONMENT=web -s WASM=1 --shell-file shell.html --closure 1"
  *	emcc $CC_FLAGS $EM_FLAGS -o out.html emscripten.cpp
  * \endcode
@@ -1993,8 +1993,8 @@
 						 || GL_HAS_EXT(ctx,        "WEBGL_compressed_texture_pvrtc");
 	if (pvr) {
 		return (alpha)
-			? cTFPVRTC1_4_RGBA // 9
-			: cTFPVRTC1_4_RGB; // 8
+			? transcoder_texture_format::cTFPVRTC1_4_RGBA
+			: transcoder_texture_format::cTFPVRTC1_4_RGB;
 	}
 #endif
 #if BASISD_SUPPORT_ASTC || !defined(BASISD_SUPPORT_ASTC)
@@ -2004,7 +2004,7 @@
 	 */
 	static bool const astc = GL_HAS_EXT(ctx, "WEBGL_compressed_texture_astc");
 	if (astc) {
-		return cTFASTC_4x4; // 10
+		return transcoder_texture_format::cTFASTC_4x4_RGBA;
 	}
 #endif
 #if BASISD_SUPPORT_DXT1 || !defined(BASISD_SUPPORT_DXT1)
@@ -2017,8 +2017,8 @@
 						 || GL_HAS_EXT(ctx, "WEBKIT_WEBGL_compressed_texture_s3tc");
 	if (dxt) {
 		return (alpha)
-			? cTFBC3  // 3
-			: cTFBC1; // 2
+			? transcoder_texture_format::cTFBC3_RGBA
+			: transcoder_texture_format::cTFBC1_RGB;
 	}
 #endif
 #if BASISD_SUPPORT_ETC2_EAC_A8 || !defined(BASISD_SUPPORT_ETC2_EAC_A8)
@@ -2028,8 +2028,8 @@
 	static bool const etc2 = GL_HAS_EXT(ctx, "WEBGL_compressed_texture_etc");
 	if (etc2) {
 		return (alpha)
-			? cTFETC2  // 1
-			: cTFETC1; // 0
+			? transcoder_texture_format::cTFETC2_RGBA
+			: transcoder_texture_format::cTFETC1_RGB;
 	}
 #endif
 	/*
@@ -2039,12 +2039,12 @@
 	 */
 	static bool const etc1 = GL_HAS_EXT(ctx, "WEBGL_compressed_texture_etc1");
 	if (etc1 && !alpha) {
-		return cTFETC1; // 0
+		return transcoder_texture_format::cTFETC1_RGB;
 	}
 	/*
 	 * We choose 8888 over 4444 and 565 (in the hope that is is never chosen).
 	 */
-	return cTFRGBA32; // 13
+	return transcoder_texture_format::cTFRGBA32;
 }
 
 /**
@@ -2058,23 +2058,23 @@
  */
 static GLenum toGlType(transcoder_texture_format const type) {
 	switch (type) {
-	case cTFETC1:
+	case transcoder_texture_format::cTFETC1_RGB:
 		return GL_ETC1_RGB8_OES;
-	case cTFETC2:
+	case transcoder_texture_format::cTFETC2_RGBA:
 		return GL_COMPRESSED_RGBA8_ETC2_EAC;
-	case cTFBC1:
+	case transcoder_texture_format::cTFBC1_RGB:
 		return GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
-	case cTFBC3:
+	case transcoder_texture_format::cTFBC3_RGBA:
 		return GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
-	case cTFPVRTC1_4_RGB:
+	case transcoder_texture_format::cTFPVRTC1_4_RGB:
 		return GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
-	case cTFPVRTC1_4_RGBA:
+	case transcoder_texture_format::cTFPVRTC1_4_RGBA:
 		return GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
-	case cTFASTC_4x4:
+	case transcoder_texture_format::cTFASTC_4x4_RGBA:
 		return GL_COMPRESSED_RGBA_ASTC_4x4_KHR;
-	case cTFRGBA32:
+	case transcoder_texture_format::cTFRGBA32:
 		return GL_UNSIGNED_BYTE;
-	case cTFRGB565:
+	case transcoder_texture_format::cTFRGB565:
 		return GL_UNSIGNED_SHORT_5_6_5;
 	default:
 		return GL_UNSIGNED_SHORT_4_4_4_4;
@@ -2116,20 +2116,21 @@
 						success = false;
 						if (transcoder.get_image_level_desc(data, size, 0, level, descW, descH, blocks)) {
 							uint32_t decSize;
-							if (type == cTFPVRTC1_4_RGB || type == cTFPVRTC1_4_RGBA) {
+							if (type == transcoder_texture_format::cTFPVRTC1_4_RGB ||
+								type == transcoder_texture_format::cTFPVRTC1_4_RGBA)
+							{
 								decSize = (std::max(8U, (descW + 3) & ~3) *
 										   std::max(8U, (descH + 3) & ~3) * 4 + 7) / 8;
 							} else {
 								decSize = basis_get_bytes_per_block(type) * blocks;
 							}
-							
 							if (void* decBuf = malloc(decSize)) {
-								if (type >= cTFTotalBlockTextureFormats) {
+								if (type >= transcoder_texture_format::cTFTotalTextureFormats) {
 									// note that blocks becomes total number of pixels for RGB/RGBA
 									blocks = descW * descH;
 								}
 								if (transcoder.transcode_image_level(data, size, 0, level, decBuf, blocks, type)) {
-									if (type < cTFTotalBlockTextureFormats) {
+									if (type < transcoder_texture_format::cTFTotalTextureFormats) {
 										glCompressedTexImage2D(GL_TEXTURE_2D, level,
 											toGlType(type), descW, descH, 0, decSize, decBuf);
 									} else {