Compressed XML
Moderators: CEGUI MVP, CEGUI Team
Compressed XML
XML files have a tendency to get quite bulky and large. It would great if they could zipped and read from zip files.
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Re: Compressed XML
Hi,
"large" is pretty relative these days. Compared to other resources of a game, the size of the gui files is very small i think.
Besides, distributable packages of a game are often zipped or packed with an installer anyways.
Don't you agree?
"large" is pretty relative these days. Compared to other resources of a game, the size of the gui files is very small i think.
Besides, distributable packages of a game are often zipped or packed with an installer anyways.
Don't you agree?
Re: Compressed XML
This is already possible using the ResourceProvider class. In fact, its one of the easier things to hook up.
Subclass DefaultResourceProvider, and in loadRawDataContainer, read the entry from the zip files and pass the raw byte data back to cegui. Then in unloadRawDataContainer, just free up the byte data (or return it to a pool, or whatever).
This allows the app side of things to do pretty much anything they want in regards to file handling.
Subclass DefaultResourceProvider, and in loadRawDataContainer, read the entry from the zip files and pass the raw byte data back to cegui. Then in unloadRawDataContainer, just free up the byte data (or return it to a pool, or whatever).
This allows the app side of things to do pretty much anything they want in regards to file handling.
Re: Compressed XML
Thanks for the tips on how to implement a new resource provider. I'll have a look at this at some point.
WRT to resource sizes. Yes, the installer may compress resources for you, but why take up extra disc space unnecessarily? Another nice thing about zipping is having packages of data, so e.g. you might have a theme packaged in one file (all XML and images). This makes distribution and easy.
This isn't a massive priority to me but it would be a nice addition.
WRT to resource sizes. Yes, the installer may compress resources for you, but why take up extra disc space unnecessarily? Another nice thing about zipping is having packages of data, so e.g. you might have a theme packaged in one file (all XML and images). This makes distribution and easy.
This isn't a massive priority to me but it would be a nice addition.
Return to “CEGUI Library Development Discussion”
Who is online
Users browsing this forum: No registered users and 8 guests