Permalink
Browse files

Add support for 7-Zip.

This new 7Zip reader supports COPY,Deflate,BZ2,LZMA and LZMA2.
This also supports BCJ + LZMA2, DELTA + LZMA and DELTA + LZMA2.
(BCJ + LZMA is not supported, there is some problems to support it.)

This 7Zip reader cannot work on stream because of its format:
its header is placed at the bottom of the archive file, so we
have to call seek().

SVN-Revision: 3844
  • Loading branch information...
1 parent f34d431 commit e58ec44597f9d9d2ff237f5878a22e658bd80434 @ggcueroad ggcueroad committed Nov 27, 2011
View
@@ -133,6 +133,7 @@ libarchive_la_SOURCES= \
libarchive/archive_read_support_filter_rpm.c \
libarchive/archive_read_support_filter_uu.c \
libarchive/archive_read_support_filter_xz.c \
+ libarchive/archive_read_support_format_7zip.c \
libarchive/archive_read_support_format_all.c \
libarchive/archive_read_support_format_ar.c \
libarchive/archive_read_support_format_cab.c \
@@ -304,6 +305,7 @@ libarchive_test_SOURCES= \
libarchive/test/test_read_disk_entry_from_file.c \
libarchive/test/test_read_extract.c \
libarchive/test/test_read_file_nonexistent.c \
+ libarchive/test/test_read_format_7zip.c \
libarchive/test/test_read_format_ar.c \
libarchive/test/test_read_format_cab.c \
libarchive/test/test_read_format_cab_filename.c \
@@ -452,6 +454,19 @@ libarchive_test_EXTRA_DIST=\
libarchive/test/test_fuzz.cab.uu \
libarchive/test/test_fuzz.lzh.uu \
libarchive/test/test_pax_filename_encoding.tar.uu \
+ libarchive/test/test_read_format_7zip_bcj_lzma2.7z.uu \
+ libarchive/test/test_read_format_7zip_bzip2.7z.uu \
+ libarchive/test/test_read_format_7zip_copy.7z.uu \
+ libarchive/test/test_read_format_7zip_copy_2.7z.uu \
+ libarchive/test/test_read_format_7zip_deflate.7z.uu \
+ libarchive/test/test_read_format_7zip_delta_lzma1.7z.uu \
+ libarchive/test/test_read_format_7zip_delta_lzma2.7z.uu \
+ libarchive/test/test_read_format_7zip_empty_archive.7z.uu \
+ libarchive/test/test_read_format_7zip_empty_file.7z.uu \
+ libarchive/test/test_read_format_7zip_lzma1.7z.uu \
+ libarchive/test/test_read_format_7zip_lzma1_2.7z.uu \
+ libarchive/test/test_read_format_7zip_lzma1_lzma2.7z.uu \
+ libarchive/test/test_read_format_7zip_lzma2.7z.uu \
libarchive/test/test_read_format_ar.ar.uu \
libarchive/test/test_read_format_cab_1.cab.uu \
libarchive/test/test_read_format_cab_2.cab.uu \
@@ -59,6 +59,7 @@ SET(libarchive_SOURCES
archive_read_support_filter_rpm.c
archive_read_support_filter_uu.c
archive_read_support_filter_xz.c
+ archive_read_support_format_7zip.c
archive_read_support_format_all.c
archive_read_support_format_ar.c
archive_read_support_format_cab.c
View
@@ -286,6 +286,7 @@ typedef int archive_close_callback(struct archive *, void *_client_data);
#define ARCHIVE_FORMAT_LHA 0xB0000
#define ARCHIVE_FORMAT_CAB 0xC0000
#define ARCHIVE_FORMAT_RAR 0xD0000
+#define ARCHIVE_FORMAT_7ZIP 0xE0000
/*-
* Basic outline for reading an archive:
@@ -345,6 +346,7 @@ __LA_DECL int archive_read_support_filter_rpm(struct archive *);
__LA_DECL int archive_read_support_filter_uu(struct archive *);
__LA_DECL int archive_read_support_filter_xz(struct archive *);
+__LA_DECL int archive_read_support_format_7zip(struct archive *);
__LA_DECL int archive_read_support_format_all(struct archive *);
__LA_DECL int archive_read_support_format_ar(struct archive *);
__LA_DECL int archive_read_support_format_cab(struct archive *);
Oops, something went wrong.

0 comments on commit e58ec44

Please sign in to comment.