[physfs] Adding Support for Custom Archives

Ryan C. Gordon icculus at icculus.org
Tue Aug 17 22:16:25 EDT 2010

> I agree. A plugin interface should not be very difficult to implement at
> all. If you look at the source, we basically just have to add some
> methods for setting callbacks and describing what our archiver can do
> with a struct or two. In other words, just replacing what cmake is doing
> at compile time via #ifdefs with some runtime code.

Basically. One level will eventually just replace the platform file i/o 
abstraction with a structure full of function pointers. Then we can 
provide a read/write/seek/etc for blocks of memory, other archives 
providing an enclosed archive, etc...anything that can conceptually be a 
stream of bytes.

Then the archive interface will be exposed in a similar way, so you can 
provide functions that enumerate, decompress, etc, from that 
steam-of-bytes abstraction.


More information about the physfs mailing list