Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion Add a Extra Menu to mGBA
#6
(10-24-2015, 09:22 PM)endrift Wrote: I am fortunately not using libarchive, which when used wrong would lead to this sort of thing. Unfortunately, since I'm not using libarchive, I can't actually do 7z loading on the 3DS. I've had trouble getting it working at all, and libzip seems kind of unhappy on the 3DS, which is holding up that feature.

Hmm, libzip says it's only for ZIP.

If you're okay with just ZIP and GZ support, please check out nall/decode/inflate.hpp in my source.
Link: https://gitlab.com/higan/higan/blob/mast...nflate.hpp

This is an INFLATE implementation in < 8KiB of code (around ~250 lines of actual code.) It's heavily based on zlib's minizip, so you'll probably want to mark it as "zlib licensed." It's not the fastest in the world (about 50% slower than zlib), but it gets the job done with no fuss and no dependencies. Should be fine even for 32MiB archives on the 3DS processor.

The code works on its own, so you can delete the nall prefix/suffix and use it as a header.

Also, a refresher on the ZIP file format: https://gitlab.com/higan/higan/blob/mast...de/zip.hpp

Even tinier, about ~80 lines to parse those. This one depends on a bunch of other nall libs, so you probably don't wanna use this.

Anyway, your call. Don't have to use it if you don't want Smile

I haven't been crazy enough to attempt an LZMA2 decoder yet.
Reply



Messages In This Thread
Suggestion Add a Extra Menu to mGBA - by CrispX - 10-21-2015, 06:27 PM
RE: Suggestion Add a Extra Menu to mGBA - by byuu - 10-24-2015, 07:56 PM
RE: Suggestion Add a Extra Menu to mGBA - by byuu - 10-25-2015, 07:34 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 Melroy van den Berg.