Generates the lzma_fastpos[] lookup table.
More...
#include <inttypes.h>
#include <stdio.h>
#include "fastpos.h"
Go to the source code of this file.
Generates the lzma_fastpos[] lookup table.
Definition in file fastpos_tablegen.c.
◆ main()
Definition at line 20 of file fastpos_tablegen.c.
30 for (
uint8_t slot_fast = 2; slot_fast < fast_slots; ++slot_fast) {
31 const uint32_t k = 1 << ((slot_fast >> 1) - 1);
33 fastpos[
c] = slot_fast;
36 printf(
"/* This file has been automatically generated "
37 "by fastpos_tablegen.c. */\n\n"
38 "#include \"common.h\"\n"
39 "#include \"fastpos.h\"\n\n"
40 "const uint8_t lzma_fastpos[1 << FASTPOS_BITS] = {");
46 printf(
"%3u", (
unsigned int)(fastpos[
i]));
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
References c, FASTPOS_BITS, i, k, and printf().