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.

118 lines
3.4 KiB

  1. //
  2. // defproto.h
  3. //
  4. // Function prototypes
  5. // comninit.c
  6. void InitStaticBlock(void);
  7. // definit.c
  8. VOID deflateInit(VOID);
  9. VOID DeflateInitRecordingTables(
  10. BYTE * recording_literal_len,
  11. USHORT *recording_literal_code,
  12. BYTE * recording_dist_len,
  13. USHORT *recording_dist_code
  14. );
  15. // output.c
  16. void outputBits(t_encoder_context *context, int n, int x);
  17. void flushOutputBitBuffer(t_encoder_context *context);
  18. void InitBitBuffer(t_encoder_context *context);
  19. void FlushRecordingBuffer(t_encoder_context *context);
  20. void outputTreeStructure(t_encoder_context *context, const BYTE *literal_tree_len, const BYTE *dist_tree_len);
  21. void OutputBlock(t_encoder_context *context);
  22. // deftree.c
  23. void makeTree(
  24. int num_elements,
  25. int max_code_length,
  26. unsigned short * freq,
  27. unsigned short * code,
  28. byte * len
  29. );
  30. void makeCode(int num_elements, const int *len_cnt, const BYTE *len, USHORT *code);
  31. // optfmtch.c
  32. int optimal_find_match(t_encoder_context *context, long BufPos);
  33. void optimal_insert(t_encoder_context *context, long BufPos, long end_pos);
  34. void optimal_remove_node(t_encoder_context *context, long BufPos, ULONG end_pos);
  35. void removeNodes(t_encoder_context *context);
  36. void reinsertRemovedNodes(t_encoder_context *context);
  37. // optenc.c
  38. void OptimalEncoderDeflate(t_encoder_context *context);
  39. void OptimalEncoderReset(t_encoder_context *context);
  40. BOOL OptimalEncoderInit(t_encoder_context *context);
  41. void OptimalEncoderZeroFrequencyCounts(t_optimal_encoder *encoder);
  42. // stdenc.c
  43. void StdEncoderDeflate(
  44. t_encoder_context * context,
  45. int search_depth,
  46. int lazy_match_threshold,
  47. int good_length,
  48. int nice_length
  49. );
  50. void StdEncoderReset(t_encoder_context *context);
  51. BOOL StdEncoderInit(t_encoder_context *context);
  52. void StdEncoderZeroFrequencyCounts(t_std_encoder *encoder);
  53. // stdblock.c
  54. BOOL StdEncoderOutputBlock(t_encoder_context *context);
  55. // fastenc.c
  56. BOOL FastEncoderInit(t_encoder_context *context);
  57. void FastEncoderDeflate(
  58. t_encoder_context * context,
  59. int search_depth,
  60. int lazy_match_threshold,
  61. int good_length,
  62. int nice_length
  63. );
  64. VOID FastEncoderCreateStaticTrees(VOID);
  65. void FastEncoderGenerateDynamicTreeEncoding(void);
  66. void FastEncoderOutputPreamble(t_encoder_context *context);
  67. // deflate.c
  68. VOID DestroyIndividualCompressors(PVOID void_context);
  69. void InternalResetCompression(t_encoder_context *context);
  70. HRESULT WINAPI Compress(
  71. PVOID void_context,
  72. CONST BYTE * input_buffer,
  73. LONG input_buffer_size,
  74. PBYTE output_buffer,
  75. LONG output_buffer_size,
  76. PLONG input_used,
  77. PLONG output_used,
  78. INT compression_level
  79. );
  80. // defmisc.c
  81. void NormaliseFrequencies(USHORT *literal_tree_freq, USHORT *dist_tree_freq);
  82. // optblock.c
  83. BOOL OptimalEncoderOutputBlock(t_encoder_context *context);
  84. // stddebug.c
  85. #ifdef _DEBUG
  86. void StdEncoderVerifyHashes(t_encoder_context *context, long bufpos);
  87. void StdEncoderVerifyHashChain(t_encoder_context *context, long bufpos, int chain_number);
  88. #endif
  89. // optdebug.c
  90. #ifdef _DEBUG
  91. void OptimalEncoderVerifyHashes(t_encoder_context *context, long bufpos);
  92. #endif
  93. // fstdebug.c
  94. #ifdef _DEBUG
  95. void FastEncoderVerifyHashes(t_encoder_context *context, long bufpos);
  96. void FastEncoderVerifyHashChain(t_encoder_context *context, long bufpos, int chain_number);
  97. #endif