Compressed XML

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Wibble
Just popping in
Just popping in
Posts: 4
Joined: Fri Oct 28, 2005 05:45

Compressed XML

Postby Wibble » Fri Oct 28, 2005 05:57

XML files have a tendency to get quite bulky and large. It would great if they could zipped and read from zip files.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Re: Compressed XML

Postby scriptkid » Fri Oct 28, 2005 07:22

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?

User avatar
gcarlton
Just can't stay away
Just can't stay away
Posts: 149
Joined: Wed Jan 12, 2005 12:06

Re: Compressed XML

Postby gcarlton » Fri Oct 28, 2005 08:40

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. :pint:

User avatar
Wibble
Just popping in
Just popping in
Posts: 4
Joined: Fri Oct 28, 2005 05:45

Re: Compressed XML

Postby Wibble » Fri Oct 28, 2005 18:46

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.


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests