Packedobjects provides a simple API to very concisely compress XML based on a predefined schema. This schema is a valid subset of XML Schema to facilitate writing network protocols.
When you open the example in Xcode you will see the files in red need to be added. These can be copied from https://github.com/jptmoore/packedobjects/tree/master/ in the src and schema directories.
Scroll the picker to the file you want to test. The output in the textview is a result of compressing the selected XML file and decompressing the result back as a string.