文章詳情頁
Windows Vista自帶的壓縮工具你發(fā)現(xiàn)沒?
瀏覽:3日期:2023-08-05 13:24:37
Windows Vista系統(tǒng)自帶了很多豐富使用的命令行工具,今天我們就來介紹一下makecab工具,從它的名字就可以看出是制作cab壓縮文件的工具,cab壓縮格式由微軟公司設(shè)計,Windows Vista、XP系統(tǒng)的安裝程序就是采用的cab壓縮格式,壓縮比例不比RAR、ZIP格式低。 我們在Vista開始菜單中輸入cmd回車,輸入makecab e:windowsnotepad.exe d:notepad.cab 。意思就是壓縮e盤上windows vista自帶的記事本程序,保存到磁盤分區(qū)d根目錄中,如圖1所示: 圖1 我們可以看到Windows Vista記事本原始文件大小為 148 KB,如圖2所示: 圖2 在磁盤分區(qū)D上,我們可以看到壓縮后的notepad.cab 文件大小為 112 KB,如圖3所示: 圖3 從結(jié)果看到我們只減少 148-112=36 KB,這是因為我們使用的是makecab默認(rèn)的壓縮算法。我們輸入makecab /?查看它的參數(shù)如下 C:UsersVista地帶>makecab /? Cabinet Maker - Lossless Data Compression Tool MAKECAB [/V[n]] [/D var=value ...] [/L dir] source [destination] MAKECAB [/V[n]] [/D var=value ...] /F directive_file [...] source File to compress. destination File name to give compressed file. If omitted, the last character of the source file name is replaced with an underscore (_) and used as the destination. /F directives A file with MakeCAB directives (may be repeated). Refer to Microsoft Cabinet SDK for information on directive_file. /D var=value Defines variable with specifIEd value. /L dir Location to place destination (default is current Directory). /V[n] Verbosity level (1..3). 這里我們可以使用compressiontype=lzx參數(shù),采用LZX算法或 compressiontype=mszip 采用ZIP算法。 最后我們來說一下cab格式文件的解壓縮,使用extract命令可以解壓縮cab格式文件,這里我們輸入extract d:notepad.cab d:notepad.exe 即可還原到exe原始文件,如圖4所示: 圖4
標(biāo)簽:
Windows系統(tǒng)
排行榜
