Vitual file system


I’m new to JUCE and I’d like to know if there is a “Virtual File System” supported. That means I can add ( compressed, encrypted ) files into a single file and retrieve/find a file inside it by specify its directory like ordinary file system.

Any suggestion will be appreciated. Thanks.


Not really; the closest to support for that sort of thing is with Zip files [I just posted code to make your own, to go alongside juce’s built in handling for reading them], but it likely won’t be as flexible as you’re after.

The ZipFile class doesn’t support encryption, so you’d have to extend that yourself. The ZipFileMaker class I wrote doesn’t support encryption either, nor does it do compression [it’s not as pointless as it sounds though - after all you can still bundle files up], so you’d have to extend that too.

If all you need to do is a one-time packaging of files into an archive, then it’d be sufficient. If you need to keep some file open and add/retrieve files randomly (and certainly if you want compression and encryption) then it won’t really be useful.

Sorry I can’t recommend any other libs which may be of use to you; i’ve never had any call for such a thing. Perhaps someone here has more knowledge on the subject. Maybe you could try to code one yourself using what Juce has to offer! [I imagine it would take some effort!]


Best bet is to search Google. libferris is one, but I don’t know if it’s cross platform.


SolFS is a workhorse and cross-platform:


Embedded file system (based on Qt4)
nFS (C++)
VFS (another C++) implementation with compression and encryption support
And a very simple, yet powerful (with compression) storage library

Let me know if you find another one.