TiledSharp
TiledSharp copied to clipboard
How to get the Layer base64 data without decode
Hi. How to get the Layer base64 data without decode? This a function is exists?
The encoded data (or any other raw data) is not saved anywhere, but we can try to add it if it would be useful for you. (Maybe optionally?)
I just needed to get information from layer tag: data value, encoding and compression.
For this, I added code in the TmxLayer constructor.
Encoding = encoding;
Compression = (string)xData.Attribute("compression");
Data = xData.Value.Trim();
I Don't know whether to add it to your repository. I just thought such a function is, but could not find.
It's easy enough to add that info. This is normally not saved because the library automatically uncompresses and decodes the data. Adding the info will use up a bit more memory, but I don't think it will be very much. (We are not doing much to conserve memory anyway...)
But maybe a different appraoch is to load all the data, and then create a function which decompresses and returns the decompressed data?
Anyway, I will think over this tonight.
Just I have have very specific requirements =) And I need original, not decompresses layer data.