Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.2 KiB

  1. /*
  2. * decdefs.h
  3. *
  4. * Structures and definitions used by the decoder
  5. */
  6. typedef enum
  7. {
  8. DEC_STATE_UNKNOWN,
  9. DEC_STATE_START_NEW_BLOCK,
  10. DEC_STATE_DECODING_DATA
  11. } decoder_state;
  12. /*
  13. * Size of uncompressed data chunks
  14. */
  15. #define CHUNK_SIZE 32768
  16. /*
  17. * Main tree decoding table parameters
  18. */
  19. /* # elements in main tree */
  20. #define MAIN_TREE_ELEMENTS (NUM_CHARS+(context->dec_num_position_slots<<NL_SHIFT))
  21. /*
  22. * Decoding table size allows a direct lookup on the first
  23. * MAIN_TREE_TABLE_BITS bits of the code (max len 16).
  24. * Any potential remaining bits are decoded using left/right.
  25. */
  26. #define MAIN_TREE_TABLE_BITS 10
  27. /*
  28. * Secondary length tree decoding table parameters
  29. * Decoding table size allows a direct lookup on the first
  30. * SECONDARY_LEN_TREE_TABLE_BITS of the code (max len 16).
  31. * Any potential remaining bits are decoded using left/right.
  32. */
  33. #define SECONDARY_LEN_TREE_TABLE_BITS 8
  34. /*
  35. * Aligned offset tree decoding table parameters
  36. */
  37. #define ALIGNED_NUM_ELEMENTS 8
  38. /*
  39. * Must be 7, since we do not use left/right for this tree;
  40. * everything is decoded in one lookup.
  41. */
  42. #define ALIGNED_TABLE_BITS 7