• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

_7z/H04-Nov-2017-240187

common/H04-Nov-2017-639505

lzmasdk/H04-Nov-2017-4,8063,864

rar/H04-Nov-2017-3,4252,922

tar/H04-Nov-2017-419348

test/H04-Nov-2017-154104

zip/H04-Nov-2017-1,7471,470

AUTHORSH A D04-Nov-2017655 1511

CHANGELOG.mdH A D04-Nov-2017802 2720

COPYINGH A D04-Nov-20177.6 KiB166128

README.mdH A D04-Nov-20172.8 KiB8857

pkg-config.pc.cmakeH A D04-Nov-2017343 1210

unarr.hH A D04-Nov-20175.4 KiB13163

README.md

1# (lib)unarr
2
3**(lib)unarr** is a decompression library for RAR, TAR, ZIP and 7z* archives.
4
5It was forked from **unarr**, which originated as a port of the RAR extraction
6features from The Unarchiver project required for extracting images from comic
7book archives. [Zeniko](https://github.com/zeniko/) wrote unarr as an
8alternative to libarchive which didn't have support for parsing filters or
9solid compression at the time.
10
11While (lib)unarr was started with the intent of providing unarr with a proper
12cmake based build system suitable for packaging and cross-platform development,
13it's focus has now been extended to provide code maintenance and to continue the
14development of unarr, which no longer is maintained.
15
16## Getting started
17
18### Building from source
19
20#### Dependencies
21
22(lib)unarr can take advantage of the following libraries if they are present:
23
24* bzip2
25* xz / libLZMA
26* zlib
27
28More information on what library is used for which purpose can be found in the
29description for embedded builds.
30
31#### Cmake
32
33>mkdir build
34>cd build
35>cmake ..
36>make
37
38... as a static library
39
40>cmake .. -DBUILD_SHARED_LIBS=OFF
41
42Install
43
44>make install
45
46#### Embedded build
47
48Make sure your compiler is C99 compatible, grab the source code, copy it into your project and adjust your build system accordingly.
49
50You can define the following symbols to take advantage of third party libraries:
51
52| Symbol            | Required header | Required for (format/method)|
53|-------------------|:---------------:|:----------------------------|
54|HAVE_ZLIB          |     zlib.h      |  faster CRC-32 and Deflate  |
55|HAVE_BZIP2         |     bzlib.h     |    ZIP / Bzip2              |
56|HAVE_LIBLZMA       |     lzma.h      |    ZIP / LZMA, XZ(LZMA2)    |
57|HAVE_7Z            |     7z.h        |    7Z* / LZMA, LZMA2, BCJ   |
58|_7ZIP_PPMD_SUPPORT |                 |    7Z* / PPMd               |
59
60Make sure the required headers are present in the include path.
61
62## Usage
63
64### Examples
65
66Check [unarr.h](unarr.h) and [unarr-test](test/main.c) to get a general feel
67for the api and usage.
68
69## Limitations
70
71Unarr was written for comic book archives, so it currently doesn't support:
72
73* password protected archives
74* self extracting archives
75* split archives
76
77### 7z support
78
797z support is currently broken. This is due to two problems:
80
811. The version of the LZMA SDK used in the 7z extraction code is outdated and
82no longer compatible with the LZMA code used in the other formats
832. The ANSI-C based 7z extraction code provided by the LZMA SDK has a known
84performance issue that limits it's usefullness for large files with solid
85compression (see https://github.com/zeniko/unarr/issues/4).
86
87Fixing these problems requires a partial rewrite of the code involved.
88