summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_read_support_compression_all.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2008-12-06 06:45:15 +0000
committerkientzle <kientzle@FreeBSD.org>2008-12-06 06:45:15 +0000
commite59163f249e40175754ba81c7d87afbe5d1ed3b5 (patch)
tree07033908f13a75f6e70696ff70c73d1160bb8e74 /lib/libarchive/archive_read_support_compression_all.c
parent01e9b693cc22dbc3f9dcb3d8873312befa9c0e25 (diff)
downloadFreeBSD-src-e59163f249e40175754ba81c7d87afbe5d1ed3b5.zip
FreeBSD-src-e59163f249e40175754ba81c7d87afbe5d1ed3b5.tar.gz
MfP4: Big read filter refactoring.
This is an attempt to eliminate a lot of redundant code from the read ("decompression") filters by changing them to juggle arbitrary-sized blocks and consolidate reblocking code at a single point in archive_read.c. Along the way, I've changed the internal read/consume API used by the format handlers to a slightly different style originally suggested by des@. It does seem to simplify a lot of common cases. The most dramatic change is, of course, to archive_read_support_compression_none(), which has just evaporated into a no-op as the blocking code this used to hold has all been moved up a level. There's at least one more big round of refactoring yet to come before the individual filters are as straightforward as I think they should be...
Diffstat (limited to 'lib/libarchive/archive_read_support_compression_all.c')
-rw-r--r--lib/libarchive/archive_read_support_compression_all.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libarchive/archive_read_support_compression_all.c b/lib/libarchive/archive_read_support_compression_all.c
index de3d585..967546d 100644
--- a/lib/libarchive/archive_read_support_compression_all.c
+++ b/lib/libarchive/archive_read_support_compression_all.c
@@ -39,5 +39,11 @@ archive_read_support_compression_all(struct archive *a)
#if HAVE_ZLIB_H
archive_read_support_compression_gzip(a);
#endif
+#if HAVE_LZMADEC_H
+ /* LZMA bidding is subject to false positives because
+ * the LZMA file format has a very weak signature. It
+ * may not be feasible to include LZMA detection here. */
+ /* archive_read_support_compression_lzma(a); */
+#endif
return (ARCHIVE_OK);
}
OpenPOWER on IntegriCloud