The three parsing primitives the TMX path needs that were not already in the tree (zlib inflate + the JSON reader already shipped): - Xml.* — a minimal, deterministic pure-Ludic XML reader for the element/attribute/CDATA subset TMX/TSX/TX use, spliced on demand. Handles nested elements, single/double-quoted attributes, text + <![CDATA[…]]>, comments, the <?xml?> prolog and <!DOCTYPE>, the five predefined entities and numeric character references. - Base64.* — standard base64 (RFC 4648) decode + a matching pure-Ludic encoder; the decoder ignores the whitespace Tiled wraps into <data>. Splicing Base64.* also pulls in inflate.ludic so a plain tool can run the full base64 -> zlib/gzip decode chain. - z_gunzip — gzip framing (RFC 1952) over the existing DEFLATE inflater: skip the 10-byte header + optional fields, inflate the body, ignore the CRC32/ISIZE trailer. Golden corpus vendored under assets/tiled-fixtures/ (mapeditor/tiled examples, attributed, + hand-authored multi-encoding fixtures). New example library/tiled_p0.ludic proves all three (21 assertions); docs pages + inventory added so check-impl stays green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
25 lines
1 KiB
XML
25 lines
1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- Hand-authored fixture for the Ludic Tiled reader (issue #67). Public domain (CC0). -->
|
|
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="4" height="4" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="1">
|
|
<tileset firstgid="1" source="handmade.tsx"/>
|
|
<layer id="1" name="csv" width="4" height="4">
|
|
<data encoding="csv">
|
|
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,2147483649
|
|
</data>
|
|
</layer>
|
|
<layer id="2" name="base64" width="4" height="4">
|
|
<data encoding="base64">
|
|
AQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAAQAAgA==
|
|
</data>
|
|
</layer>
|
|
<layer id="3" name="gzip" width="4" height="4">
|
|
<data encoding="base64" compression="gzip">
|
|
H4sIAAAAAAAC/w3Dhw0AIAwEsQ+9hpUZPWfJJikxs7CysXNwcnHz8NL5aNIPlvf4ekAAAAA=
|
|
</data>
|
|
</layer>
|
|
<layer id="4" name="zlib" width="4" height="4">
|
|
<data encoding="base64" compression="zlib">
|
|
eJwNw4cNACAMBLEPvYaVGT1nySYpMbOwsrFzcHJx8/DS+WjSDw1EAPo=
|
|
</data>
|
|
</layer>
|
|
</map>
|