compress.hpp 972 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef _RAR_COMPRESS_
  2. #define _RAR_COMPRESS_
  3. class ComprDataIO;
  4. class PackingFileTable;
  5. #define MAX_LZ_MATCH 0x101
  6. #define CODEBUFSIZE 0x4000
  7. #define MAXWINSIZE 0x400000
  8. #define MAXWINMASK (MAXWINSIZE-1)
  9. #define LOW_DIST_REP_COUNT 16
  10. #define NC 299 /* alphabet = {0, 1, 2, ..., NC - 1} */
  11. #define DC 60
  12. #define LDC 17
  13. #define RC 28
  14. #define HUFF_TABLE_SIZE (NC+DC+RC+LDC)
  15. #define BC 20
  16. #define NC20 298 /* alphabet = {0, 1, 2, ..., NC - 1} */
  17. #define DC20 48
  18. #define RC20 28
  19. #define BC20 19
  20. #define MC20 257
  21. // Largest alphabet size among all values listed above.
  22. #define LARGEST_TABLE_SIZE 299
  23. enum {CODE_HUFFMAN,CODE_LZ,CODE_LZ2,CODE_REPEATLZ,CODE_CACHELZ,
  24. CODE_STARTFILE,CODE_ENDFILE,CODE_VM,CODE_VMDATA};
  25. enum FilterType {
  26. FILTER_NONE, FILTER_PPM /*dummy*/, FILTER_E8, FILTER_E8E9,
  27. FILTER_UPCASETOLOW, FILTER_AUDIO, FILTER_RGB, FILTER_DELTA,
  28. FILTER_ITANIUM, FILTER_E8E9V2
  29. };
  30. #endif