base: add ABXR, ABXS magic numbers
diff --git a/internal/cgen/base/magic-submodule.c b/internal/cgen/base/magic-submodule.c
index 0160f75..96b9ecb 100644
--- a/internal/cgen/base/magic-submodule.c
+++ b/internal/cgen/base/magic-submodule.c
@@ -145,27 +145,30 @@
int32_t fourcc;
const char* magic;
} table[] = {
- {-0x30302020, "\x01\x00\x00"}, // '00 'be
- {+0x475A2020, "\x02\x1F\x8B\x08"}, // GZ
- {+0x5A535444, "\x03\x28\xB5\x2F\xFD"}, // ZSTD
- {+0x425A3220, "\x02\x42\x5A\x68"}, // BZ2
- {+0x424D5020, "\x01\x42\x4D"}, // BMP
- {+0x47494620, "\x03\x47\x49\x46\x38"}, // GIF
- {+0x54494646, "\x03\x49\x49\x2A\x00"}, // TIFF (little-endian)
- {+0x4C5A4950, "\x04\x4C\x5A\x49\x50\x01"}, // LZIP
- {+0x54494646, "\x03\x4D\x4D\x00\x2A"}, // TIFF (big-endian)
- {+0x45544332, "\x03\x50\x4B\x4D\x20"}, // ETC2 (*.pkm)
- {+0x4E50424D, "\x02\x50\x35\x0A"}, // NPBM (P5; *.pgm)
- {+0x4E50424D, "\x02\x50\x36\x0A"}, // NPBM (P6; *.ppm)
- {-0x52494646, "\x03\x52\x49\x46\x46"}, // RIFF
- {+0x4C5A4D41, "\x04\x5D\x00\x10\x00\x00"}, // LZMA
- {+0x4C5A4D41, "\x02\x5D\x00\x00"}, // LZMA
- {+0x4E494520, "\x02\x6E\xC3\xAF"}, // NIE
- {+0x514F4920, "\x03\x71\x6F\x69\x66"}, // QOI
- {+0x5A4C4942, "\x01\x78\x9C"}, // ZLIB
- {+0x504E4720, "\x03\x89\x50\x4E\x47"}, // PNG
- {+0x585A2020, "\x04\xFD\x37\x7A\x58\x5A"}, // XZ
- {+0x4A504547, "\x01\xFF\xD8"}, // JPEG
+ {-0x30302020, "\x01\x00\x00"}, // '00 'be
+ {+0x41425852, "\x03\x03\x00\x08\x00"}, // ABXR
+ {+0x475A2020, "\x02\x1F\x8B\x08"}, // GZ
+ {+0x5A535444, "\x03\x28\xB5\x2F\xFD"}, // ZSTD
+ {+0x584D4C20, "\x05\x3C\x3F\x78\x6D\x6C\x20"}, // XML
+ {+0x41425853, "\x03\x41\x42\x58\x00"}, // ABXS
+ {+0x425A3220, "\x02\x42\x5A\x68"}, // BZ2
+ {+0x424D5020, "\x01\x42\x4D"}, // BMP
+ {+0x47494620, "\x03\x47\x49\x46\x38"}, // GIF
+ {+0x54494646, "\x03\x49\x49\x2A\x00"}, // TIFF (little-endian)
+ {+0x4C5A4950, "\x04\x4C\x5A\x49\x50\x01"}, // LZIP
+ {+0x54494646, "\x03\x4D\x4D\x00\x2A"}, // TIFF (big-endian)
+ {+0x45544332, "\x03\x50\x4B\x4D\x20"}, // ETC2 (*.pkm)
+ {+0x4E50424D, "\x02\x50\x35\x0A"}, // NPBM (P5; *.pgm)
+ {+0x4E50424D, "\x02\x50\x36\x0A"}, // NPBM (P6; *.ppm)
+ {-0x52494646, "\x03\x52\x49\x46\x46"}, // RIFF
+ {+0x4C5A4D41, "\x04\x5D\x00\x10\x00\x00"}, // LZMA
+ {+0x4C5A4D41, "\x02\x5D\x00\x00"}, // LZMA
+ {+0x4E494520, "\x02\x6E\xC3\xAF"}, // NIE
+ {+0x514F4920, "\x03\x71\x6F\x69\x66"}, // QOI
+ {+0x5A4C4942, "\x01\x78\x9C"}, // ZLIB
+ {+0x504E4720, "\x03\x89\x50\x4E\x47"}, // PNG
+ {+0x585A2020, "\x04\xFD\x37\x7A\x58\x5A"}, // XZ
+ {+0x4A504547, "\x01\xFF\xD8"}, // JPEG
};
static const size_t table_len = sizeof(table) / sizeof(table[0]);
diff --git a/lang/builtin/builtin.go b/lang/builtin/builtin.go
index 6dcb58a..8b81ca1 100644
--- a/lang/builtin/builtin.go
+++ b/lang/builtin/builtin.go
@@ -24,6 +24,8 @@
)
var FourCCs = [...][2]string{
+ {"ABXR", "Android Binary XML (for resources; see AndroidBinXmlParser.java)"},
+ {"ABXS", "Android Binary XML (for system_server; see BinaryXmlSerializer.java)"},
{"BGCL", "Background Color"},
{"BMP ", "Bitmap"},
{"BRTL", "Brotli"},
diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c
index 6600821..665c4b8 100644
--- a/release/c/wuffs-unsupported-snapshot.c
+++ b/release/c/wuffs-unsupported-snapshot.c
@@ -754,6 +754,12 @@
// Wuffs' u32 values are big-endian ("JPEG" is 0x4A504547 not 0x4745504A) to
// preserve ordering: "JPEG" < "MP3 " and 0x4A504547 < 0x4D503320.
+// Android Binary XML (for resources; see AndroidBinXmlParser.java).
+#define WUFFS_BASE__FOURCC__ABXR 0x41425852
+
+// Android Binary XML (for system_server; see BinaryXmlSerializer.java).
+#define WUFFS_BASE__FOURCC__ABXS 0x41425853
+
// Background Color.
#define WUFFS_BASE__FOURCC__BGCL 0x4247434C
@@ -22363,27 +22369,30 @@
int32_t fourcc;
const char* magic;
} table[] = {
- {-0x30302020, "\x01\x00\x00"}, // '00 'be
- {+0x475A2020, "\x02\x1F\x8B\x08"}, // GZ
- {+0x5A535444, "\x03\x28\xB5\x2F\xFD"}, // ZSTD
- {+0x425A3220, "\x02\x42\x5A\x68"}, // BZ2
- {+0x424D5020, "\x01\x42\x4D"}, // BMP
- {+0x47494620, "\x03\x47\x49\x46\x38"}, // GIF
- {+0x54494646, "\x03\x49\x49\x2A\x00"}, // TIFF (little-endian)
- {+0x4C5A4950, "\x04\x4C\x5A\x49\x50\x01"}, // LZIP
- {+0x54494646, "\x03\x4D\x4D\x00\x2A"}, // TIFF (big-endian)
- {+0x45544332, "\x03\x50\x4B\x4D\x20"}, // ETC2 (*.pkm)
- {+0x4E50424D, "\x02\x50\x35\x0A"}, // NPBM (P5; *.pgm)
- {+0x4E50424D, "\x02\x50\x36\x0A"}, // NPBM (P6; *.ppm)
- {-0x52494646, "\x03\x52\x49\x46\x46"}, // RIFF
- {+0x4C5A4D41, "\x04\x5D\x00\x10\x00\x00"}, // LZMA
- {+0x4C5A4D41, "\x02\x5D\x00\x00"}, // LZMA
- {+0x4E494520, "\x02\x6E\xC3\xAF"}, // NIE
- {+0x514F4920, "\x03\x71\x6F\x69\x66"}, // QOI
- {+0x5A4C4942, "\x01\x78\x9C"}, // ZLIB
- {+0x504E4720, "\x03\x89\x50\x4E\x47"}, // PNG
- {+0x585A2020, "\x04\xFD\x37\x7A\x58\x5A"}, // XZ
- {+0x4A504547, "\x01\xFF\xD8"}, // JPEG
+ {-0x30302020, "\x01\x00\x00"}, // '00 'be
+ {+0x41425852, "\x03\x03\x00\x08\x00"}, // ABXR
+ {+0x475A2020, "\x02\x1F\x8B\x08"}, // GZ
+ {+0x5A535444, "\x03\x28\xB5\x2F\xFD"}, // ZSTD
+ {+0x584D4C20, "\x05\x3C\x3F\x78\x6D\x6C\x20"}, // XML
+ {+0x41425853, "\x03\x41\x42\x58\x00"}, // ABXS
+ {+0x425A3220, "\x02\x42\x5A\x68"}, // BZ2
+ {+0x424D5020, "\x01\x42\x4D"}, // BMP
+ {+0x47494620, "\x03\x47\x49\x46\x38"}, // GIF
+ {+0x54494646, "\x03\x49\x49\x2A\x00"}, // TIFF (little-endian)
+ {+0x4C5A4950, "\x04\x4C\x5A\x49\x50\x01"}, // LZIP
+ {+0x54494646, "\x03\x4D\x4D\x00\x2A"}, // TIFF (big-endian)
+ {+0x45544332, "\x03\x50\x4B\x4D\x20"}, // ETC2 (*.pkm)
+ {+0x4E50424D, "\x02\x50\x35\x0A"}, // NPBM (P5; *.pgm)
+ {+0x4E50424D, "\x02\x50\x36\x0A"}, // NPBM (P6; *.ppm)
+ {-0x52494646, "\x03\x52\x49\x46\x46"}, // RIFF
+ {+0x4C5A4D41, "\x04\x5D\x00\x10\x00\x00"}, // LZMA
+ {+0x4C5A4D41, "\x02\x5D\x00\x00"}, // LZMA
+ {+0x4E494520, "\x02\x6E\xC3\xAF"}, // NIE
+ {+0x514F4920, "\x03\x71\x6F\x69\x66"}, // QOI
+ {+0x5A4C4942, "\x01\x78\x9C"}, // ZLIB
+ {+0x504E4720, "\x03\x89\x50\x4E\x47"}, // PNG
+ {+0x585A2020, "\x04\xFD\x37\x7A\x58\x5A"}, // XZ
+ {+0x4A504547, "\x01\xFF\xD8"}, // JPEG
};
static const size_t table_len = sizeof(table) / sizeof(table[0]);