Answer the question
In order to leave comments, you need to log in
How to implement decompression of data in base64 compressed gzip from xml file. C# language?
There is an xml file from the Tile program (tile map editor) with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="5" height="5" tilewidth="32" tileheight="32">
<tileset firstgid="1" name="blocks1" tilewidth="32" tileheight="32" spacing="2" margin="2">
<image source="blocks1.png" width="614" height="376"/>
</tileset>
<layer name="Tile Layer 1" width="5" height="5">
<data encoding="base64" compression="gzip">
H4sIAAAAAAAAC0tmYGBIAeJUBuJAMgH12OQByaQF+GQAAAA=
</data>
</layer>
</map>
<data encoding="base64" compression="gzip">
H4sIAAAAAAAAC0tmYGBIAeJUBuJAMgH12OQByaQF+GQAAAA=
</data>
list of xml elements. <?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="5" height="5" tilewidth="32" tileheight="32">
<tileset firstgid="1" name="blocks1" tilewidth="32" tileheight="32" spacing="2" margin="2">
<image source="blocks1.png" width="614" height="376"/>
</tileset>
<layer name="Tile Layer 1" width="5" height="5">
<data>
<tile gid="99"/>
<tile gid="100"/>
<tile gid="101"/>
<tile gid="0"/>
<tile gid="0"/>
<tile gid="0"/>
<tile gid="0"/>
<tile gid="0"/>
<tile gid="0"/>
<tile gid="0"/>
<tile gid="0"/>
<tile gid="0"/>
<tile gid="99"/>
<tile gid="100"/>
<tile gid="101"/>
<tile gid="0"/>
<tile gid="0"/>
<tile gid="0"/>
<tile gid="0"/>
<tile gid="0"/>
<tile gid="99"/>
<tile gid="100"/>
<tile gid="101"/>
<tile gid="0"/>
<tile gid="0"/>
</data>
</layer>
</map>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question