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.

64 lines
1.9 KiB

  1. /*
  2. * api_int.h
  3. *
  4. * Internal API function prototypes and flags
  5. *
  6. * The api.h which is given to decompression clients is hand-created from this file.
  7. */
  8. // flags for CreateCompression() and CreateDeCompression()
  9. #define COMPRESSION_FLAG_DEFLATE 0
  10. #define COMPRESSION_FLAG_GZIP 1
  11. #define COMPRESSION_FLAG_DO_GZIP COMPRESSION_FLAG_GZIP
  12. #define DECOMPRESSION_FLAG_DO_GZIP COMPRESSION_FLAG_GZIP
  13. // Initialise global DLL compression data
  14. HRESULT WINAPI InitCompression(VOID);
  15. // Initialise global DLL decompression data
  16. HRESULT WINAPI InitDecompression(VOID);
  17. // Free global compression data
  18. VOID WINAPI DeInitCompression(VOID);
  19. // Free global decompression data
  20. VOID WINAPI DeInitDecompression(VOID);
  21. // Create a new compression context
  22. HRESULT WINAPI CreateCompression(PVOID *context, ULONG flags);
  23. // Compress data
  24. HRESULT WINAPI Compress(
  25. PVOID context, // compression context
  26. CONST BYTE * input_buffer, // input buffer
  27. LONG input_buffer_size, // size of input buffer
  28. PBYTE output_buffer, // output buffer
  29. LONG output_buffer_size, // size of output buffer
  30. PLONG input_used, // amount of input buffer used
  31. PLONG output_used, // amount of output buffer used
  32. INT compression_level // compression level (1...10)
  33. );
  34. // Reset compression state (for compressing new file)
  35. HRESULT WINAPI ResetCompression(PVOID context);
  36. // Destroy compression context
  37. VOID WINAPI DestroyCompression(PVOID context);
  38. // Create a decompression context
  39. HRESULT WINAPI CreateDecompression(PVOID *context, ULONG flags);
  40. // Decompress data
  41. HRESULT WINAPI Decompress(
  42. PVOID void_context,
  43. CONST BYTE * input,
  44. LONG input_size,
  45. BYTE * output,
  46. LONG output_size,
  47. PLONG input_used,
  48. PLONG output_used
  49. );
  50. HRESULT WINAPI ResetDecompression(PVOID void_context);
  51. VOID WINAPI DestroyDecompression(PVOID void_context);