33 _(
"Usage: %s [--help] [--version] [FILE]...\n"
34 "Show information stored in the .lzma file header"),
progname);
37 "\nWith no FILE, or when FILE is -, read standard input.\n"));
40 printf(
_(
"Report bugs to <%s> (in English or Finnish).\n"),
65 static const struct option long_opts[] = {
94 for (
e = 0;
n > 1; ++
e,
n /= 2) ;
107 ferror(
f) ? strerror(errno)
108 :
_(
"File is too small to be a .lzma file"));
121 _(
"Not a .lzma file"));
129 fprintf(stderr,
"%s: %s\n",
progname,
130 _(
"Internal error (bug)"));
136 for (
size_t i = 0;
i < 8; ++
i)
146 printf(
"Uncompressed size: ");
157 printf(
"\nDictionary size: "
159 "Literal context bits (lc): %" PRIu32 "\n"
160 "Literal pos bits (lp): %" PRIu32 "\n"
161 "Number of pos bits (pb): %" PRIu32 "\n",
162 (opt->
dict_size + 512 * 1024) / (1024 * 1024),
179 #ifdef TUKLIB_DOSLIKE
183 int ret = EXIT_SUCCESS;
202 fprintf(stderr,
"%s: %s: %s\n",
215 }
while (++
optind < argc);
#define PACKAGE_BUGREPORT
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
RZ_API void Ht_() free(HtName_(Ht) *ht)
static static fork const void static count static fd const char const char static newpath char char argv
#define LZMA_FILTER_LZMA1
LZMA1 Filter ID.
The public API of liblzma data compression library.
static void lzma_attribute((__noreturn__))
int main(int argc, char **argv)
static bool lzmainfo(const char *name, FILE *f)
Parse the .lzma header and display information about it.
static void parse_args(int argc, char **argv)
Parse command line options.
static uint32_t my_log2(uint32_t n)
Primitive base-2 logarithm for integers.
Options specific to the LZMA1 and LZMA2 filters.
uint32_t lp
Number of literal position bits.
uint32_t lc
Number of literal context bits.
uint32_t pb
Number of position bits.
uint32_t dict_size
Dictionary size in bytes.
uint64_t uncompressed_size
Common includes, definitions, system-specific things etc.
Close stdout and stderr, and exit.
Wrapper for gettext and friends.
#define tuklib_gettext_init(package, localedir)
Program name to be displayed in messages.
#define tuklib_progname_init
@ LZMA_MEM_ERROR
Cannot allocate memory.
@ LZMA_OPTIONS_ERROR
Invalid or unsupported options.
@ LZMA_OK
Operation completed successfully.
#define LZMA_VERSION_STRING
Compile-time version as a string.