Windows NT 4.0 source code leak
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.

54 lines
1.6 KiB

4 years ago
  1. /**********************************************************************
  2. *
  3. * Text Compression Public Header File
  4. *
  5. **********************************************************************/
  6. // Phrase table information, used for compression and decompression.
  7. // Size of header information in PHR struct below.
  8. #define CB_PHR_HEADER (sizeof(INT16) + sizeof(WORD) + sizeof(DWORD))
  9. // 3.0 ver file does not have the cbPhrases field & is not zeck compressed:
  10. #define CB_PHR_HEADER3_0 (sizeof(INT16) + sizeof(WORD))
  11. typedef struct {
  12. /*
  13. * These first three fields are stored in the filesystem. Their length
  14. * is represented by CB_PHR_HEADER above.
  15. */
  16. INT16 cPhrases; // Number of phrases in table.
  17. WORD wBaseToken; // Base token to map to.
  18. DWORD cbPhrases; // uncompressed size of phrases (not including
  19. // offset table or header).
  20. /*
  21. * These fields are fixed up when the phrase table is allocated or
  22. * reloaded.
  23. */
  24. HFS hfs; // Filesystem handle to restore phrases from.
  25. // REVIEW: hrgcb is obsolete, and should be removed once forage
  26. // code gets rid of its dependency on this
  27. GH hrgcb; /* Handle to the array of offsets to phrases,
  28. * and to the phrases themselves. The array is
  29. * of size cPhrases+1, so that the length of any
  30. * phrase is easily computed. Offsets are
  31. * relative to the start of this array.
  32. */
  33. INT16* qcb; // Pointer to array, must be 16 bits
  34. } PHR, * QPHR;
  35. // Returned on OOM in HphrLoadTableHfs
  36. #define hphrOOM ((HPHR) -1)
  37. RC_TYPE STDCALL RcCreatePhraseTableFm(FM, HFS, UINT);
  38. QPHR STDCALL HphrLoadTableHfs(HFS, int);
  39. UINT STDCALL CbCompressQch(PSTR, QPHR);