bzip2
source code builds to a libbzip2
that you can link to in your code as long as you have a sufficiently good compiler (and I believe that is the case for iOS - although I haven't tried...)
The code you need to write would look something like this:
int error;
const int MAXSIZE = 4096; // Or some other decent size.
char buffer[MAXSIZE];
FILE *f = fopen("somefile.bz2", "rb");
BZFILE* b = BZ2_bzReadOpen(&error, f, 0, 0, NULL, 0);
do {
BZ2_bzRead(&error, b, buffer, MAXSIZE);
} while(error != BZ_OK);
BZ2_bzReadClose(&error, b);
You may need to add a few more checks for "error", but the concept should work [I think - I just typed all that code in based in the docs and my experience from using this and similar packages in the past].