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.

37 lines
871 B

  1. //
  2. // comninit.c
  3. //
  4. // Initialisation code common to inflate and deflate
  5. //
  6. #include <stdio.h>
  7. #include <crtdbg.h>
  8. #include "inflate.h"
  9. #include "deflate.h"
  10. // Called by InitCompression() and InitDecompression() (functions to init global DLL data)
  11. //
  12. // Initialises the tree lengths of static type blocks
  13. //
  14. void InitStaticBlock(void)
  15. {
  16. int i;
  17. // No real thread synchronisation problems with doing this
  18. if (g_InitialisedStaticBlock == FALSE)
  19. {
  20. g_InitialisedStaticBlock = TRUE;
  21. for (i = 0; i <= 143; i++)
  22. g_StaticLiteralTreeLength[i] = 8;
  23. for (i = 144; i <= 255; i++)
  24. g_StaticLiteralTreeLength[i] = 9;
  25. for (i = 256; i <= 279; i++)
  26. g_StaticLiteralTreeLength[i] = 7;
  27. for (i = 280; i <= 287; i++)
  28. g_StaticLiteralTreeLength[i] = 8;
  29. }
  30. }