Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the Layer base64 data without decode #35

Open
EFLFE opened this issue Oct 11, 2016 · 4 comments
Open

How to get the Layer base64 data without decode #35

EFLFE opened this issue Oct 11, 2016 · 4 comments

Comments

@EFLFE
Copy link

EFLFE commented Oct 11, 2016

Hi. How to get the Layer base64 data without decode? This a function is exists?

@marshallward
Copy link
Owner

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?)

@EFLFE
Copy link
Author

EFLFE commented Oct 14, 2016

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.

@marshallward
Copy link
Owner

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.

@EFLFE
Copy link
Author

EFLFE commented Oct 14, 2016

Just I have have very specific requirements =) And I need original, not decompresses layer data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants