vimpunk / mio

Cross-platform C++11 header-only library for memory mapped file IO
MIT License
1.71k stars 157 forks source link

Add support for Android AAssets mapping #17

Open jherico opened 6 years ago

vimpunk commented 6 years ago

I don't have experience with Android programming, so I'm a bit lost as to what this is (and unfortunately a quick search didn't yield me anything concrete). Could you please provide me with some additional info?

jherico commented 6 years ago

In addition to the normal filesystem on Android, there is an asset filesystem whereby applications can access read-only resources that are embedded in the APK.

There is an overview of the API here. Assets can be opened as a file descriptor, or they can be opened simply as a buffer, where you get back a const void* to the contents of the asset.

vimpunk commented 6 years ago

Thanks for the update. If assets can be opened as a file descriptor, could mio not be used as is, passing the descriptor to the constructor/mapping function?