PackDef.compress_hpp.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. namespace SharpCompress.Compressors.Rar.UnpackV2017
  2. {
  3. internal static class PackDef
  4. {
  5. // Combine pack and unpack constants to class to avoid polluting global
  6. // namespace with numerous short names.
  7. public const uint MAX_LZ_MATCH = 0x1001;
  8. public const uint MAX3_LZ_MATCH = 0x101; // Maximum match length for RAR v3.
  9. public const uint LOW_DIST_REP_COUNT = 16;
  10. public const uint NC = 306; /* alphabet = {0, 1, 2, ..., NC - 1} */
  11. public const uint DC = 64;
  12. public const uint LDC = 16;
  13. public const uint RC = 44;
  14. public const uint HUFF_TABLE_SIZE = NC + DC + RC + LDC;
  15. public const uint BC = 20;
  16. public const uint NC30 = 299; /* alphabet = {0, 1, 2, ..., NC - 1} */
  17. public const uint DC30 = 60;
  18. public const uint LDC30 = 17;
  19. public const uint RC30 = 28;
  20. public const uint BC30 = 20;
  21. public const uint HUFF_TABLE_SIZE30 = NC30 + DC30 + RC30 + LDC30;
  22. public const uint NC20 = 298; /* alphabet = {0, 1, 2, ..., NC - 1} */
  23. public const uint DC20 = 48;
  24. public const uint RC20 = 28;
  25. public const uint BC20 = 19;
  26. public const uint MC20 = 257;
  27. // Largest alphabet size among all values listed above.
  28. public const uint LARGEST_TABLE_SIZE = 306;
  29. // enum {
  30. // CODE_HUFFMAN, CODE_LZ, CODE_REPEATLZ, CODE_CACHELZ, CODE_STARTFILE,
  31. // CODE_ENDFILE, CODE_FILTER, CODE_FILTERDATA
  32. // };
  33. //enum FilterType {
  34. // These values must not be changed, because we use them directly
  35. // in RAR5 compression and decompression code.
  36. public const int FILTER_DELTA = 0;
  37. public const int FILTER_E8 = 1;
  38. public const int FILTER_E8E9 = 2;
  39. public const int FILTER_ARM = 3;
  40. public const int FILTER_AUDIO = 4;
  41. public const int FILTER_RGB = 5;
  42. public const int FILTER_ITANIUM = 6;
  43. public const int FILTER_PPM = 7;
  44. public const int FILTER_NONE = 8;
  45. //}
  46. }
  47. }