mirror of
https://github.com/vasi/pixz
synced 2024-11-18 15:26:46 +00:00
Enable both seekable and non-seekable modes
This commit is contained in:
parent
dd86134d64
commit
dd5f6d01e3
4
list.c
4
list.c
@ -3,7 +3,9 @@
|
||||
#pragma mark FUNCTION DEFINITIONS
|
||||
|
||||
void pixz_list(bool tar) {
|
||||
decode_index();
|
||||
if (!decode_index())
|
||||
die("Can't list non-seekable input");
|
||||
|
||||
lzma_index_iter iter;
|
||||
lzma_index_iter_init(&iter, gIndex);
|
||||
|
||||
|
5
read.c
5
read.c
@ -85,7 +85,7 @@ static lzma_vli gFileIndexOffset = 0;
|
||||
#pragma mark MAIN
|
||||
|
||||
void pixz_read(bool verify, size_t nspecs, char **specs) {
|
||||
if (0 && decode_index()) { // FIXME
|
||||
if (decode_index()) { // FIXME
|
||||
if (verify)
|
||||
gFileIndexOffset = read_file_index();
|
||||
wanted_files(nspecs, specs);
|
||||
@ -96,7 +96,8 @@ void pixz_read(bool verify, size_t nspecs, char **specs) {
|
||||
debug("want: %s", w->name);
|
||||
#endif
|
||||
|
||||
pipeline_create(block_create, block_free, read_thread_noindex, decode_thread);
|
||||
pipeline_create(block_create, block_free,
|
||||
gIndex ? read_thread : read_thread_noindex, decode_thread);
|
||||
if (verify && gFileIndexOffset) {
|
||||
// FIXME: verify this works with noindex/streamed reading
|
||||
// FIXME: don't stop on End Of Archive
|
||||
|
Loading…
Reference in New Issue
Block a user