Update libarchive README and fix comment

This commit is contained in:
BEN ENGLISCH 2022-08-27 15:18:54 -05:00 committed by Luis Ángel San Martín
parent 636c339699
commit cb5439cd96
3 changed files with 23 additions and 25 deletions

View File

@ -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)

View File

@ -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?

View File

@ -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) {