中华网络安全联盟 收藏本站
设为主页
商务合作
首页 新闻中心 行业动态 软件新闻 安全资讯 病毒预警 漏洞发布 操作系统 Dos Win9x Win2000 WinXP Win2003 WinVista Linux Unix
数据库 DB2 Access MSSQL MySQL Oracle Sybase 编程技术 ASP PHP JSP CGI/Perl XML .Net C/C++/C# VB VC Delphi Java 汇编
安全技术 安全教学 工具介绍 漏洞利用 病毒防范 入侵检测 防火墙 安全防范 汉化破解 攻击实例 加密解密 进程知识 技术论坛
中华网络安全联盟 >> 操作系统 >> Vista >> Windows Vista自带的压缩工具你发现没?
操作系统
Windows XP
Windows 2000
Windows Vista
Windows 2003
Windows 9x
DOS
Linux
Unix
制作MinWin的ASCII启动
告别CMD黑暗时代 迎来
两法解决Windows Vist
利用Winsock LSP修复V
不需摆弄PS 图片处理让
倾力打造Vista的流光溢
Vista系统启动失败自动
只需两招 Vista虚拟内
Windows Vista自带的压缩工具你发现没?
字体:

中华网络安全联盟    作者:佚名    来源:互联网    时间:2007-10-27 16:43:26

Windows Vista系统自带了很多丰富使用的命令行工具,今天我们就来介绍一下makecab工具,从它的名字就可以看出是制作cab压缩文件的工具,cab压缩格式由微软公司设计,Windows Vista、XP系统的安装程序就是采用的cab压缩格式,压缩比例不比RAR、ZIP格式低。

   我们在Vista开始菜单中输入cmd回车,输入makecab e:\windows\notepad.exe d:\notepad.cab 。意思就是压缩e盘上windows vista自带的记事本程序,保存到磁盘分区d根目录中,如图1所示:

Windows Vista自带的压缩工具你发现没?

图1

   我们可以看到Windows Vista记事本原始文件大小为 148 KB,如图2所示:

Windows Vista自带的压缩工具你发现没?

图2

   在磁盘分区D上,我们可以看到压缩后的notepad.cab 文件大小为 112 KB,如图3所示:

Windows Vista自带的压缩工具你发现没?

图3

   从结果看到我们只减少 148-112=36 KB,这是因为我们使用的是makecab默认的压缩算法。我们输入makecab /?查看它的参数如下

   C:\Users\Vista地带>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参数,采用LZX算法或 compressiontype=mszip 采用ZIP算法。
   最后我们来说一下cab格式文件的解压缩,使用extract(点击下载)命令可以解压缩cab格式文件,这里我们输入extract d:\notepad.cab d:\notepad.exe 即可还原到exe原始文件,如图4所示:
 
Windows Vista自带的压缩工具你发现没?

图4


字体:
 
设为主页 收藏本站 联系我们 友情连接 商务合作 网友留言
Copyright©2006-2008 中华网络安全联盟 All rights reserved.