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.

77 lines
2.4 KiB

  1. /* DEC/CMS REPLACEMENT HISTORY, Element CompPub.H */
  2. /* *1 14-NOV-1996 10:26:09 ANIGBOGU "[113914]Prototype definitions of exported compression/decompression functions" */
  3. /* DEC/CMS REPLACEMENT HISTORY, Element CompPub.H */
  4. /* PUBLIC FILE
  5. ******************************************************************************
  6. **
  7. ** (c) Copyright Schlumberger Technology Corp., unpublished work, created 1996.
  8. **
  9. ** This computer program includes Confidential, Proprietary Information and is
  10. ** a Trade Secret of Schlumberger Technology Corp. All use, disclosure, and/or
  11. ** reproduction is prohibited unless authorized in writing by Schlumberger.
  12. ** All Rights Reserved.
  13. **
  14. ******************************************************************************
  15. **
  16. ** compress/CompPub.h
  17. **
  18. ** PURPOSE
  19. **
  20. ** Prototype definitions for the compression/decompression interfaces
  21. **
  22. ** SPECIAL REQUIREMENTS & NOTES
  23. **
  24. ** AUTHOR
  25. **
  26. ** J. C. Anigbogu
  27. ** Austin Systems Center
  28. ** Nov 1996
  29. **
  30. ******************************************************************************
  31. */
  32. /* Return codes */
  33. typedef enum {
  34. COMPRESS_OK,
  35. BAD_COMPRESSION_LEVEL,
  36. BAD_MAGIC_HEADER,
  37. BAD_COMPRESSED_DATA,
  38. BAD_BLOCK_TYPE,
  39. BAD_CODE_LENGTHS,
  40. BAD_INPUT,
  41. EXTRA_BITS,
  42. UNKNOWN_COMPRESSION_METHOD,
  43. INCOMPLETE_CODE_SET,
  44. END_OF_BLOCK,
  45. BLOCK_VANISHED,
  46. FORMAT_VIOLATED,
  47. CRC_ERROR,
  48. LENGTH_ERROR,
  49. INSUFFICIENT_MEMORY
  50. } CompressStatus_t;
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54. CompressStatus_t Compress(unsigned char *Input,
  55. unsigned int InputSize,
  56. unsigned char **Output,
  57. unsigned int *OutputSize,
  58. unsigned int CompLevel);
  59. CompressStatus_t Decompress(unsigned char *Input,
  60. unsigned int InputSize,
  61. unsigned char **Output,
  62. unsigned int *OutputSize);
  63. void TranslateErrorMsg(char *Message,
  64. CompressStatus_t ErrorCode);
  65. void *CompressMalloc(unsigned int Size,
  66. CompressStatus_t *ErrorCode);
  67. void CompressFree(void *Address);
  68. #ifdef __cplusplus
  69. }
  70. #endif