Halsafar-loadFromMemory

It is not always the case that you can load from a filename or a FILE*.  In some cases such as loading compressed files you want to feed in raw data.  

I've been using this function for awhile, figured a pr might be worth it now.