So I am not sure if what I want is even doable with KArchive or if I am simply just going about it the wrong way.
Am working on a manga/comic reader for myself that can handle archives and I would like it to have the option to just extract one image at a time as the page is requested rather than just loading all of the images into RAM or a temp location all at once. So far I was able to implement it such that it could extract all the images into a vector while/after it was parsing through the archive to sort the pages into the correct order.
The issue comes in when I want to use it later by adding the KArchiveFile
for an entry to a vector or list of some kind. The problem is that doing it that way when a user requests the next page the memory address for that KArchiveFile
is the same as it was when it was put into that list/index, but the data about the name, position, size, etc. is all gone/jumbled up. So essentially the pointer is fine, but it doesn’t seem like the data of the variable was constant.
From my understanding const KArchiveFile*
should be a pointer to a constant value so I am not sure what is going on exactly or how KArchiveFile stores it’s various data. Am a bit of a novice when it comes to programming and was just doing this for a bit of a learning project so I may very well be missing something very simple.
It seems like as far as I can tell that KArchiveFile should be the class that I want for my solution, but I am not sure how to go about it. Honestly don’t even really feel like I have anything to show as an example atm with how much I’ve redone things trying to get it to work. Will post an example later, but my code is a bit of a mess atm with how much I’ve fiddled about with things trying to get it to work.