freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

哈夫曼編碼與譯碼(附源碼)(編輯修改稿)

2024-07-25 01:45 本頁面
 

【文章內(nèi)容簡(jiǎn)介】 { c = HuffmanT[c].rchild。 } if (HuffmanT[c].rchild == 1)//判斷是否到葉子 { cout HuffmanT[c].name。 //輸出字符 c = 2 * 2。 //返回根節(jié)點(diǎn) } } ch = ()。 } cout endl。 ()。 } int SaveTransCode() {//保存文章譯碼 ofstream output。 ifstream input。 char namef[max2]。 char namef1[max2]。 cout 請(qǐng)輸入文章編碼所在的文件名: endl。 cin namef。 (namef)。 if (()) { cout 該文件不存在! endl。 return 0。 } cout 請(qǐng)輸入保存文章譯碼的文件名: endl。 cin namef1。 (namef1)。 char ch。 ch = ()。 int c = 2 * 2。 while (!()) { if (ch == 39。039。) { if (HuffmanT[c].lchild = 0) { c = HuffmanT[c].lchild。 } if (HuffmanT[c].lchild == 1) { (HuffmanT[c].name)。 c = 2 * 2。 } } if (ch == 39。139。) { if (HuffmanT[c].rchild = 0) { c = HuffmanT[c].rchild。 } if (HuffmanT[c].rchild == 1) { (HuffmanT[c].name)。 c = 2 * 2。 } } ch = ()。 } ()。 ()。 cout 保存完畢! endl。 } int FileCompression() {//文件壓縮功能 CreatHT()。 CharHuffmanTCoding()。 //保存編碼 ofstream output。 ifstream input。 char namef1[] = {}。 ()。 if (()) { cout 該文件不存在! endl。 return 0。 } (namef1)。 char ch。 while (!()) { ch = ()。 for (int i = 0。 i 。 i++) { if (Code[i].ch == ch) { for (int j = 0。 j strlen(Code[i].bits)。 j++) { (Code[i].bits[j])。 } } } } ()。 ()。 //壓縮文件 ofstream File1。 ifstream File2。 char namef2[max2]。 cout 請(qǐng)輸入壓縮后的文件名: endl。 cin namef2。 (namef2)。 (namef1)。 if (()) { cout 該文件不存在! endl。 return 0。 } char sh。 char th。 int i = 0。 char j = 39。039。 int count = 0。 while (!()) { sh = ()。 if (i 7 amp。amp。 sh != EOF) { count = count + (sh 39。039。) * pow(2, i)。 if (sh == 39。039。) { j++。 } else { j = 39。039。 } i++。 } if (i == 7) { th = count。 (th)。 i = 0。 count = 0。 } if (sh == EOF) { th = count。 (th)。 (j)。 i = 0。 count = 0。 } } ()。 ()。 remove(namef1)。 cout 文件壓縮完畢! endl。 } int FileDepression() {//文件解壓縮 //保存編碼 fstream output。 fstream input。 char namef2[max2]。 char namef1[] = {}。 cout 請(qǐng)輸入待解壓縮的文件名: endl。 cin namef2。 (namef2, ios::in | ios::binary)。 (namef1, ios::out | ios::binary)。 if (()) { cout 該文件不存在! endl。 return 0。 } char ch。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1