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.

88 lines
3.0 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 output_bits( t_encoder_context *context, ulong numbits, ulong value );
  20. void encode_verbatim_block(t_encoder_context *context, ulong literal_to_end_at);
  21. void encode_aligned_block(t_encoder_context *context, ulong literal_to_end_at);
  22. void encode_uncompressed_block(t_encoder_context *context, ulong bufpos, ulong block_size);
  23. void perform_flush_output_callback(t_encoder_context *context);
  24. ulong estimate_compressed_block_size(t_encoder_context *context);
  25. void get_final_repeated_offset_states(t_encoder_context *context, ulong distances);
  26. /* encstats.c */
  27. lzx_block_type get_aligned_stats(t_encoder_context *context, ulong dist_to_end_at);
  28. ulong get_block_stats(
  29. t_encoder_context *context,
  30. ulong literal_to_start_at,
  31. ulong distance_to_start_at,
  32. ulong literal_to_end_at
  33. );
  34. ulong update_cumulative_block_stats(
  35. t_encoder_context *context,
  36. ulong literal_to_start_at,
  37. ulong distance_to_start_at,
  38. ulong literal_to_end_at
  39. );
  40. bool split_block(
  41. t_encoder_context *context,
  42. ulong literal_to_start_at,
  43. ulong literal_to_end_at,
  44. ulong distance_to_end_at,
  45. ulong *split_at_literal,
  46. ulong *split_at_distance
  47. );
  48. /* enctree.c */
  49. void create_trees(t_encoder_context *context, bool generate_codes);
  50. void fix_tree_cost_estimates(t_encoder_context *context);
  51. void encode_trees(t_encoder_context *context);
  52. void encode_aligned_tree(t_encoder_context *context);
  53. void prevent_far_matches(t_encoder_context *context);
  54. /* init.c */
  55. void init_compression_memory(t_encoder_context *context);
  56. bool comp_alloc_compress_memory(t_encoder_context *context);
  57. /* io.c */
  58. bool init_compressed_output_buffer(t_encoder_context *context);
  59. void flush_compressed_output_buffer(t_encoder_context *context);
  60. void reset_translation(t_encoder_context *context);
  61. long comp_read_input(t_encoder_context *context, ulong BufPos, long Size);
  62. /* optenc.c */
  63. void opt_encode_top(t_encoder_context *context, long BytesRead);
  64. void reset_encoder_variables(t_encoder_context *context);
  65. void flush_all_pending_blocks(t_encoder_context *context);
  66. void encoder_start(t_encoder_context *context);
  67. void make_tree(
  68. t_encoder_context *context,
  69. int nparm,
  70. ushort *freqparm,
  71. byte *lenparm,
  72. ushort *codeparm,
  73. bool make_codes
  74. );