⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dictionary.h

📁 C++类实现LZW 压缩算法
💻 H
字号:
// Dictionary.h: interface for the CDictionary class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_DICTIONARY_H__736E8D7B_3FB4_4B85_9D5D_9A0315A1A84A__INCLUDED_)
#define AFX_DICTIONARY_H__736E8D7B_3FB4_4B85_9D5D_9A0315A1A84A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

struct dicElement
{
	DWORD	m_Prefix;		//	keep the prefix of the element
	BYTE	m_Letter;		//	keep the letter of the element

	dicElement()
	{
		m_Prefix = 0;
		m_Letter = 0;
	}
};

class CDictionary : public CPtrArray  
{
public:
	void GetBytesFromCode(CByteArray *Buffer, DWORD code);
	DWORD GetMaxCode();
	BOOL IsCodeExist(DWORD code);
	long GetEntry(DWORD prefix, BYTE letter);
	DWORD AddEntry(DWORD prefix, BYTE letter);
	void ClearDictionary();
	CDictionary();
	virtual ~CDictionary();

private:
};

#endif // !defined(AFX_DICTIONARY_H__736E8D7B_3FB4_4B85_9D5D_9A0315A1A84A__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -