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.

52 lines
1.8 KiB

  1. //
  2. // comndata.h
  3. //
  4. // Common to inflate and deflate
  5. //
  6. #ifndef _COMNDATA_H
  7. #define _COMNDATA_H
  8. #ifdef DECLARE_DATA
  9. const BYTE g_CodeOrder[] = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
  10. const BYTE g_ExtraLengthBits[] = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
  11. const BYTE g_ExtraDistanceBits[] = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0};
  12. const ULONG g_LengthBase[] = {3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258};
  13. const ULONG g_DistanceBasePosition[] = {1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,
  14. 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0};
  15. const ULONG g_BitMask[] = {0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767};
  16. BYTE g_LengthLookup[256];
  17. BYTE g_DistLookup[512];
  18. BYTE g_StaticLiteralTreeLength[MAX_LITERAL_TREE_ELEMENTS];
  19. USHORT g_StaticLiteralTreeCode[MAX_LITERAL_TREE_ELEMENTS];
  20. // note: g_StaticDistanceTreeLength == 5 for all distances, which is why we don't have a
  21. // table for that
  22. USHORT g_StaticDistanceTreeCode[MAX_DIST_TREE_ELEMENTS];
  23. BOOL g_InitialisedStaticBlock = FALSE;
  24. #else /* !DECLARE_DATA */
  25. extern const BYTE g_CodeOrder[19];
  26. extern const BYTE g_ExtraLengthBits[];
  27. extern const BYTE g_ExtraDistanceBits[];
  28. extern const ULONG g_LengthBase[];
  29. extern const ULONG g_DistanceBasePosition[];
  30. extern const ULONG g_BitMask[];
  31. extern BYTE g_LengthLookup[256];
  32. extern BYTE g_DistLookup[512];
  33. extern BYTE g_StaticLiteralTreeLength[MAX_LITERAL_TREE_ELEMENTS];
  34. extern USHORT g_StaticLiteralTreeCode[MAX_LITERAL_TREE_ELEMENTS];
  35. extern USHORT g_StaticDistanceTreeCode[MAX_DIST_TREE_ELEMENTS];
  36. extern BOOL g_InitialisedStaticBlock;
  37. #endif /* !DECLARE_DATA */
  38. #endif /* _COMNDATA_H */