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.

52 lines
1.7 KiB

  1. /****************************** MODULE HEADER ******************************
  2. * compress.h
  3. * Function prototypes and other curiosities associated with data
  4. * compression code.
  5. *
  6. * Copyright (C) 1997 - 1999 Microsoft Corporation.
  7. *
  8. ****************************************************************************/
  9. //
  10. // this parameter controls how much better (in bytes) a new compression mode
  11. // must do before it will be used instead of the current output mode
  12. #define COMP_FUDGE_FACTOR 4
  13. /*
  14. * TIFF Compression function.
  15. */
  16. int iCompTIFF( BYTE *, BYTE *, int );
  17. //
  18. // Delta Row Compression function
  19. //
  20. int iCompDeltaRow(BYTE *, BYTE *, BYTE *, int, int);
  21. /*
  22. * Some constants defining the limits of TIFF encoding. The first
  23. * represent the minimum number of repeats for which it is worth using
  24. * a repeat operation. The other two represent the maximum length
  25. * of data that can be encoded in one control byte.
  26. */
  27. #define TIFF_MIN_RUN 4 /* Minimum repeats before use RLE */
  28. #define TIFF_MAX_RUN 128 /* Maximum repeats */
  29. #define TIFF_MAX_LITERAL 128 /* Maximum consecutive literal data */
  30. /*
  31. * RLE (Run Length Encoding) functions.
  32. */
  33. int iCompRLE( BYTE *, BYTE *, int );
  34. int iCompFERLE (BYTE *, BYTE *, int, int );
  35. /*
  36. * Some constants relating to RLE operations. RLE is ony useful in
  37. * data containing runs. In purely random data, the data size will
  38. * double. Consequently, we allow a certain expansion of the data
  39. * size before calling it off. A small expansion is OK, since the
  40. * there is a cost involved in switching compression on and off.
  41. */
  42. #define FERLE_MAX_RUN 255 /* max consecutive byte count */