- printf("next_output is %u\n", next_output);
-
- printf("next_tag is %u \n", next_tag);
- printf("tags_area_end is %u\n", tags_area_end);
- printf("next_q_pos is %u\n", next_q_pos);
- printf("next_low_bits is %u\n", next_low_bits);
- printf("next_full_word is %u\n", next_full_word);
-#endif
-
- /* this loop should probably be unrolled. Maybe we should unpack
- * as 4 bit values, giving two consecutive tags, and switch on
- * that 16 ways to decompress 2 words at a whack
- */
- while (next_tag < tags_area_end) {
-
- char tag = next_tag[0];
-
- switch(tag) {
-
- case ZERO_TAG: {
- *next_output = 0;
- break;
- }
- case EXACT_TAG: {
- WK_word *dict_location = dictionary + *(next_q_pos++);
- /* no need to replace dict. entry if matched exactly */
- *next_output = *dict_location;
- break;
- }
- case PARTIAL_TAG: {
- WK_word *dict_location = dictionary + *(next_q_pos++);
- {
- WK_word temp = *dict_location;
-
- /* strip out low bits */
- temp = ((temp >> NUM_LOW_BITS) << NUM_LOW_BITS);
-
- /* add in stored low bits from temp array */
- temp = temp | *(next_low_bits++);
-
- *dict_location = temp; /* replace old value in dict. */
- *next_output = temp; /* and echo it to output */
- }
- break;
- }
- case MISS_TAG: {
- WK_word missed_word = *(next_full_word++);
- WK_word *dict_location =
- (WK_word *)
- ((void *) (((char *) dictionary) + HASH_TO_DICT_BYTE_OFFSET(missed_word)));
- *dict_location = missed_word;
- *next_output = missed_word;
- break;
- }
- }
- next_tag++;
- next_output++;
- }
-
-#ifdef WK_DEBUG
- printf("AFTER DECOMPRESSING\n");
- printf("next_output is %p\n", next_output);
- printf("next_tag is %p\n", next_tag);
- printf("next_full_word is %p\n", next_full_word);
- printf("next_q_pos is %p\n", next_q_pos);
+ printf("AFTER DECOMPRESSING\n");
+ printf("next_output is %p\n", next_output);
+ printf("next_tag is %p\n", next_tag);
+ printf("next_full_word is %p\n", next_full_word);
+ printf("next_q_pos is %p\n", next_q_pos);