Jump to content

More efficient LIF extractor


bartvbl
 Share

Recommended Posts

Hi all,

I've been using jrMasterModelBuilder's LIF extractor frequently as of late, but was somewhat annoyed at its very, very high memory consumption. It made the system completely unresponsive whenever I used it, because windows likes using the harddrive to make up for a lack of memory capacity.

 

Looking at the code of the original extractor I found out it was really easy to implement the LIF extractor myself in a way that didn't require such large amounts of memory. As a bonus feature, my implementation can also extract the contents of nested LIF files without having to extract the containing one first.

 

I've written a little GUI around it for your convenience. Many thanks to jrMasterModelBuilder for his original implementation!

 

Grab the JAR here: https://ore.rockraidersunited.org/legacy/LIFExtractor_901403.jar

Github project: https://github.com/bartvbl/LDDLifExtractor

Link to comment
Share on other sites

JrMasterModelBuilder

Yeah, my extractor is probably pretty memory hungry, it reads the entire file into memory. Assuming sufficient memory, this should be faster. I'm guessing your implementation reads from the drive as necessary?

Link to comment
Share on other sites

Yes. I use a file pointer that I move around the place. When opening the file, I only read the index located at the end, building up a file tree in memory. I then use the offset and length values to read internal files from disk when needed.

 

Assuming sufficient memory, this should be faster.

 

I don't quite agree to this if your objective is to only read a subset of files from the archive. Then loading the whole archive into memory is just wasteful. But for the purpose of extraction that is of course justified. Given the amount of system memory is sufficient.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.