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.

44 lines
1.7 KiB

  1. //
  2. // defdata.h
  3. //
  4. // Data specific to deflate
  5. //
  6. // BUGBUG Some of these USHORTs could be made into ULONGs for speed-of-access. The disadvantage would
  7. // be greater memory/cache usage. g_StaticDistanceTreeCode[] could be made into a BYTE array,
  8. // since the codes are 5 bits. Changes of this nature will require various code changes elsewhere.
  9. //
  10. #ifdef DECLARE_DATA
  11. // lookup tables for finding the slot number of a match length or distance
  12. BYTE g_LengthLookup[256];
  13. BYTE g_DistLookup[512];
  14. // literal codes for static blocks
  15. BYTE g_StaticLiteralTreeLength[MAX_LITERAL_TREE_ELEMENTS];
  16. USHORT g_StaticLiteralTreeCode[MAX_LITERAL_TREE_ELEMENTS];
  17. // distance codes for static blocks
  18. // note: g_StaticDistanceTreeLength == 5 for all distances, which is why we don't have a table for that
  19. USHORT g_StaticDistanceTreeCode[MAX_DIST_TREE_ELEMENTS];
  20. // cached tree structure output for fast encoder
  21. BYTE g_FastEncoderTreeStructureData[MAX_TREE_DATA_SIZE];
  22. int g_FastEncoderTreeLength; // # bytes in g_FastEncoderTreeStructureData
  23. ULONG g_FastEncoderPostTreeBitbuf; // final value of bitbuf
  24. int g_FastEncoderPostTreeBitcount; // final value of bitcount
  25. #else /* !DECLARE_DATA */
  26. extern BYTE g_LengthLookup[256];
  27. extern BYTE g_DistLookup[512];
  28. extern BYTE g_StaticLiteralTreeLength[MAX_LITERAL_TREE_ELEMENTS];
  29. extern USHORT g_StaticLiteralTreeCode[MAX_LITERAL_TREE_ELEMENTS];
  30. extern USHORT g_StaticDistanceTreeCode[MAX_DIST_TREE_ELEMENTS];
  31. extern BYTE g_FastEncoderTreeStructureData[MAX_TREE_DATA_SIZE];
  32. extern int g_FastEncoderTreeLength;
  33. extern ULONG g_FastEncoderPostTreeBitbuf;
  34. extern int g_FastEncoderPostTreeBitcount;
  35. #endif /* !DECLARE_DATA */