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.

90 lines
2.0 KiB

  1. /*
  2. * encapi.h
  3. *
  4. * Definitions for calling LZX apis (encapi.c)
  5. */
  6. /*
  7. * Return codes for LZX_Encode()
  8. */
  9. #define ENCODER_SUCCESS 0
  10. #define ENCODER_READ_FAILURE 1
  11. #define ENCODER_WRITE_FAILURE 2
  12. #define ENCODER_CONSOLE_FAILURE 3
  13. bool
  14. __fastcall
  15. LZX_EncodeInit(
  16. t_encoder_context ** enc_context,
  17. long compression_window_size,
  18. long second_partition_size,
  19. PFNALLOC pfnma,
  20. HANDLE hAllocator,
  21. int (__stdcall * pfnlzx_output_callback)(
  22. void * pfol,
  23. unsigned char * compressed_data,
  24. long compressed_size,
  25. long uncompressed_size
  26. ),
  27. void * fci_data
  28. );
  29. void __fastcall LZX_EncodeNewGroup(t_encoder_context *context);
  30. long __fastcall LZX_Encode(
  31. t_encoder_context * context,
  32. byte * input_data,
  33. long input_size,
  34. long * bytes_compressed,
  35. long file_size_for_translation
  36. );
  37. bool __fastcall LZX_EncodeFlush(t_encoder_context *context);
  38. bool __fastcall LZX_EncodeResetState(t_encoder_context *context);
  39. unsigned char * __fastcall LZX_GetInputData(
  40. t_encoder_context *context,
  41. unsigned long *input_position,
  42. unsigned long *bytes_available
  43. );
  44. bool __fastcall LZX_EncodeInsertDictionary(
  45. t_encoder_context *context,
  46. byte * input_data,
  47. unsigned long input_size
  48. );
  49. #ifdef TRACING
  50. #include <stdio.h>
  51. void
  52. __stdcall
  53. EncTracingMatch(
  54. unsigned long BufPos,
  55. unsigned long MatchLength,
  56. unsigned long MatchPos,
  57. unsigned long MatchOff
  58. );
  59. void
  60. __stdcall
  61. EncTracingLiteral(
  62. unsigned long BufPos,
  63. unsigned long ch
  64. );
  65. void
  66. __stdcall
  67. EncTracingDefineOffsets(
  68. unsigned long WindowSize,
  69. unsigned long InterFileBytes,
  70. unsigned long OldFileSize
  71. );
  72. #endif /* TRACING */