Source code of Windows XP (NT5)
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.

94 lines
3.1 KiB

  1. /*
  2. * encproto.h
  3. *
  4. * Encoder function prototypes
  5. */
  6. /* blkinit.c */
  7. void create_slot_lookup_table(t_encoder_context *context);
  8. void create_ones_table(t_encoder_context *context);
  9. /* block.c */
  10. void output_block(t_encoder_context *context);
  11. void flush_output_bit_buffer(t_encoder_context *context);
  12. long estimate_buffer_contents(t_encoder_context *context);
  13. ulong get_distances_from_literals(t_encoder_context *context, ulong literals);
  14. /* bsearch.c */
  15. long binary_search_findmatch(t_encoder_context *context, long BufPos);
  16. void quick_insert_bsearch_findmatch(t_encoder_context *context, long BufPos, long endpos);
  17. void binary_search_remove_node(t_encoder_context *context, long BufPos, ulong end_pos);
  18. /* encdata.c */
  19. void encode_verbatim_block(t_encoder_context *context, ulong literal_to_end_at);
  20. void encode_aligned_block(t_encoder_context *context, ulong literal_to_end_at);
  21. void encode_uncompressed_block(t_encoder_context *context, ulong bufpos, ulong block_size);
  22. void perform_flush_output_callback(t_encoder_context *context);
  23. ulong estimate_compressed_block_size(t_encoder_context *context);
  24. void get_final_repeated_offset_states(t_encoder_context *context, ulong distances);
  25. /* encstats.c */
  26. lzx_block_type get_aligned_stats(t_encoder_context *context, ulong dist_to_end_at);
  27. ulong get_block_stats(
  28. t_encoder_context *context,
  29. ulong literal_to_start_at,
  30. ulong distance_to_start_at,
  31. ulong literal_to_end_at
  32. );
  33. ulong update_cumulative_block_stats(
  34. t_encoder_context *context,
  35. ulong literal_to_start_at,
  36. ulong distance_to_start_at,
  37. ulong literal_to_end_at
  38. );
  39. bool split_block(
  40. t_encoder_context *context,
  41. ulong literal_to_start_at,
  42. ulong literal_to_end_at,
  43. ulong distance_to_end_at,
  44. ulong *split_at_literal,
  45. ulong *split_at_distance
  46. );
  47. /* enctree.c */
  48. void create_trees(t_encoder_context *context, bool generate_codes);
  49. void fix_tree_cost_estimates(t_encoder_context *context);
  50. void encode_trees(t_encoder_context *context);
  51. void encode_aligned_tree(t_encoder_context *context);
  52. void prevent_far_matches(t_encoder_context *context);
  53. /* init.c */
  54. void init_compression_memory(t_encoder_context *context);
  55. bool comp_alloc_compress_memory(t_encoder_context *context);
  56. void comp_free_compress_memory(t_encoder_context *context);
  57. /* io.c */
  58. void output_bits(t_encoder_context *context, int n, ulong x);
  59. void free_compressed_output_buffer(t_encoder_context *context);
  60. bool init_compressed_output_buffer(t_encoder_context *context);
  61. void flush_compressed_output_buffer(t_encoder_context *context);
  62. void reset_translation(t_encoder_context *context);
  63. long comp_read_input(t_encoder_context *context, ulong BufPos, long Size);
  64. /* optenc.c */
  65. void opt_encode_top(t_encoder_context *context, long BytesRead);
  66. void reset_encoder_variables(t_encoder_context *context);
  67. void flush_all_pending_blocks(t_encoder_context *context);
  68. void encoder_start(t_encoder_context *context);
  69. /* tree.c */
  70. bool allocate_tree_building_data(t_encoder_context *context);
  71. void free_tree_building_data(t_encoder_context *context);
  72. void make_tree(
  73. t_encoder_context *context,
  74. int nparm,
  75. ushort *freqparm,
  76. byte *lenparm,
  77. ushort *codeparm,
  78. bool make_codes
  79. );