diff --git a/compressed_archive/libarchive/README.md b/compressed_archive/libarchive/README.md new file mode 100644 index 00000000..71c8d11a --- /dev/null +++ b/compressed_archive/libarchive/README.md @@ -0,0 +1,22 @@ +# libarchive Decompression Backend + +This backend utilizes the [libarchive](https://www.libarchive.org/) library to support a wide +variety of compression formats. + +This backend is currently only supported on the Linux platform. + +## Using + +Enabling this backend is achieved by adding the `libarchive` qmake configuration value: + + qmake CONFIG+=libarchive + +Upon success, the application can be built as normal. + +## Limitations + + * libarchive has a stream-based architecture that does not (currently) offer random access. + In practice, this means that you can only seek forward and would have to re-open an archive + to read an entry before the current position. This doesn't seem to have a huge performance + hit and can be mitigated by creating properly sorted archives. + * 7z decompression is slow (but seems to be slightly faster than unarr) diff --git a/compressed_archive/libarchive/README.txt b/compressed_archive/libarchive/README.txt deleted file mode 100644 index 1020b4cb..00000000 --- a/compressed_archive/libarchive/README.txt +++ /dev/null @@ -1,24 +0,0 @@ -* Introduction - -TODO - -* Using - -qmake CONFIG+=libarchive - -* Supported Archives - -TODO - -* Limitations - -TODO - -v4 solid archives, slow 7z, etc. - -libarchive is stream based so it reads the archive in linear order. talk about -advantages of properly ordered archives (1.jpg..10.jpg vs 01.jpg..10.jpg) - -* Future Work - -fallback to unarr for v4 solid archives? diff --git a/compressed_archive/libarchive/compressed_archive.cpp b/compressed_archive/libarchive/compressed_archive.cpp index ee2c317e..b95f59bf 100644 --- a/compressed_archive/libarchive/compressed_archive.cpp +++ b/compressed_archive/libarchive/compressed_archive.cpp @@ -73,7 +73,7 @@ bool CompressedArchive::archive_seek(quint32 index) return true; } - // libarchive uses a streaming architecture so we cannot read files after our current position. + // libarchive uses a streaming architecture so we cannot read files before our current position. // because of this, when we need to seek to an index before our current position, // we must reopen the archive. if (idx > index) {