XZ Utils  5.2.4
Data Structures | Macros | Functions | Variables
list.c File Reference

Listing information about .xz files. More...

#include "private.h"
#include "tuklib_integer.h"

Data Structures

struct  xz_file_info
 Information about a .xz file. More...
 
struct  block_header_info
 Information about a .xz Block. More...
 

Macros

#define XZ_FILE_INFO_INIT   { NULL, 0, 0, true, 50000002 }
 
#define CHECKS_STR_SIZE   1024
 

Functions

static const char * xz_ver_to_str (uint32_t ver)
 Convert XZ Utils version number to a string. More...
 
static bool parse_indexes (xz_file_info *xfi, file_pair *pair)
 Parse the Index(es) from the given .xz file. More...
 
static bool parse_block_header (file_pair *pair, const lzma_index_iter *iter, block_header_info *bhi, xz_file_info *xfi)
 Parse the Block Header. More...
 
static bool parse_check_value (file_pair *pair, const lzma_index_iter *iter)
 Parse the Check field and put it into check_value[]. More...
 
static bool parse_details (file_pair *pair, const lzma_index_iter *iter, block_header_info *bhi, xz_file_info *xfi)
 Parse detailed information about a Block. More...
 
static const char * get_ratio (uint64_t compressed_size, uint64_t uncompressed_size)
 Get the compression ratio. More...
 
static void get_check_names (char buf[CHECKS_STR_SIZE], uint32_t checks, bool space_after_comma)
 Get a comma-separated list of Check names. More...
 
static bool print_info_basic (const xz_file_info *xfi, file_pair *pair)
 
static void print_adv_helper (uint64_t stream_count, uint64_t block_count, uint64_t compressed_size, uint64_t uncompressed_size, uint32_t checks, uint64_t stream_padding)
 
static bool print_info_adv (xz_file_info *xfi, file_pair *pair)
 
static bool print_info_robot (xz_file_info *xfi, file_pair *pair)
 
static void update_totals (const xz_file_info *xfi)
 
static void print_totals_basic (void)
 
static void print_totals_adv (void)
 
static void print_totals_robot (void)
 
void list_totals (void)
 Show the totals after all files have been listed. More...
 
void list_file (const char *filename)
 List information about the given .xz file. More...
 

Variables

static const char check_names [LZMA_CHECK_ID_MAX+1][12]
 Check ID to string mapping. More...
 
static char check_value [2 *LZMA_CHECK_SIZE_MAX+1]
 
struct {
   uint64_t   files
 
   uint64_t   streams
 
   uint64_t   blocks
 
   uint64_t   compressed_size
 
   uint64_t   uncompressed_size
 
   uint64_t   stream_padding
 
   uint64_t   memusage_max
 
   uint32_t   checks