mirror of
https://github.com/vasi/pixz
synced 2024-11-03 09:40:24 +00:00
24 lines
598 B
C
24 lines
598 B
C
#include "pixz.h"
|
|
|
|
#pragma mark FUNCTION DEFINITIONS
|
|
|
|
void pixz_list(bool tar) {
|
|
decode_index();
|
|
lzma_index_iter iter;
|
|
lzma_index_iter_init(&iter, gIndex);
|
|
|
|
if (tar && read_file_index(0)) {
|
|
dump_file_index(stdout, false);
|
|
free_file_index();
|
|
} else {
|
|
while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)) {
|
|
printf("%9"PRIuMAX" / %9"PRIuMAX"\n",
|
|
(uintmax_t)iter.block.unpadded_size,
|
|
(uintmax_t)iter.block.uncompressed_size);
|
|
}
|
|
}
|
|
|
|
lzma_index_end(gIndex, NULL);
|
|
lzma_end(&gStream);
|
|
}
|