| 128 | // Local functions |
| 129 | |
| 130 | static void PKWAREAPI GenDecodeTabs( |
| 131 | unsigned char * positions, // [out] Table of positions |
| 132 | unsigned char * start_indexes, // [in] Table of start indexes |
| 133 | unsigned char * length_bits, // [in] Table of lengths. Each length is stored as number of bits |
| 134 | size_t elements) // [in] Number of elements in start_indexes and length_bits |
| 135 | { |
| 136 | unsigned int index; |
| 137 | unsigned int length; |
| 138 | size_t i; |
| 139 | |
| 140 | for(i = 0; i < elements; i++) |
| 141 | { |
| 142 | length = 1 << length_bits[i]; // Get the length in bytes |
| 143 | |
| 144 | for(index = start_indexes[i]; index < 0x100; index += length) |
| 145 | { |
| 146 | positions[index] = (unsigned char)i; |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | static void PKWAREAPI GenAscTabs(TDcmpStruct * pWork) |
| 152 | { |