6

I'm trying to write a small, cross-platform comic book reader (Qt / C++). I don't care what's already out there, I know there are some.

My problem is that I need to read the comic book formats, which are renamed rar and zip files.

The documentation is very... nonexistent? There's no "hello archive" document anywho. How can I set this up?

If It makes it easier to assume I'm on any particular OS, do so. I'm switching between Kubuntu, OSX, and Win7 constantly for dev work.

Lunarcloud
  • 69
  • 1
  • 1
  • 3

2 Answers2

4

I've been working on a simple C++ wrapper for the 7zip SDK, which you can find here. It currently only supports Windows and the specific needs I had, but I'd be happy to make some alterations and/or accept contributions. It can extract 7zip and Zip files in a few lines of code, using the 7z.dll. RAR shouldn't be difficult to add since the DLL supports it.

Chadwick
  • 944
  • 12
  • 15
  • Do you know how to solve this: `fatal error C1900: Il mismatch between 'P1' version '20100826' and 'P2' version '20070207` error on SevenZip++? – Rookie Jan 04 '14 at 00:14
  • I'm afraid I don't know that error, but googling around a bit it sounds like it may be an issue with your Visual Studio installation. – Chadwick Jan 08 '14 at 02:59
3

7z should actually come with both source for a commandline variant and a GUI variant, you could dig into to those and see how they do the compression, else you could use unRar and see if that has any examples(unfortunatly I can't check due to the download being blocked where I am).


Poking around the LMZA SDK a bit I came across this:

ANSI-C LZMA Decoder

~~~~~~~~~~~~~~~~~~~

Please note that interfaces for ANSI-C code were changed in LZMA SDK 4.58. If you want to use old interfaces you can download previous version of LZMA SDK from sourceforge.net site.

To use ANSI-C LZMA Decoder you need the following files: 1) LzmaDec.h + LzmaDec.c + Types.h

LzmaUtil/LzmaUtil.c is example application that uses these files.

Necrolis
  • 25,836
  • 3
  • 63
  • 101