今天找了一個可以自動定時關機的軟體,叫做「自動關機程式v3.02.exe」
作者是淡江大學資工系劉聰諆,官網:
http://achigo.24cc.cc,但這不是重點@@,
重點是它網站裡面,免費軟體連結有介紹一個UPX軟體,以前就時有所聞,
它可以在不影響原有功能下,壓縮執行檔,
最高可達 50~70% 的壓縮率,可減少檔案體積和下載時間。

而作者寫出的那"一"個執行檔,竟然要1150KB,
讓我想試試UPX這個軟體幫它減肥看看,
結果果不其然,變成377KB而已,
執行開啟速度與原本未壓縮的差不了多少。

                       Ultimate Packer for eXecutables
    Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006
UPX 2.03w       Markus Oberhumer, Laszlo Molnar & John Reiser    Nov 7th 2006

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
   1177088 ->    385536   32.75%    win32/pe     shutdown_v3.02.exe

Packed 1 file.

UPX官網:http://upx.sourceforge.net
他的版本有 for Win32、linux i386.tar.gz、32bit DOS、Atari、source code
一般使用Win32版,在XP須由命令提示字元進入,
基本參數我只看了:

COMMANDS

Compress(壓縮)
This is the default operation, eg. upx yourfile.exe will compress the file specified on the command line.

Decompress(解壓縮)
All UPX supported file formats can be unpacked using the -d switch, eg. upx -d yourfile.exe will uncompress the file you've just compressed.

Test
The -t command tests the integrity of the compressed and uncompressed data, eg. upx -t yourfile.exe check whether your file can be safely decompressed. Note, that this command doesn't check the whole file, only the part that will be uncompressed during program execution. This means that you should not use this command instead of a virus checker.

List
The -l command prints out some information about the compressed files specified on the command line as parameters, eg upx -l yourfile.exe shows the compressed / uncompressed size and the compression ratio of yourfile.exe.

直接打「upx 要壓縮的程式.exe」 就可以了,
解壓縮加上 -d 參數,
它裡面還有一堆說明檔,有興趣可以去瞧瞧。

SPFDisk03t:132KB > 68KB
還不錯用,試了一些程式都還有壓縮的空間,
可惜Ghost全系列包含v8.3已經都用這壓過了,
如果你想要把一堆程式壓在一片軟碟片裡,這個就還蠻好用的。
畢竟3.5吋軟碟片只有1.44MB,記得FreeDOS的程式好像也是用這壓的吧!
所以一般做出來的都比微軟以前DOS做的還小、功能更強大,
畢竟FreeDOS、UPX都還在發展。


==========
Toget介紹:
http://toget.pchome.com.tw/intro/utility_file/utility_file_compression/25394.html

UPX - 超強悍的執行檔壓縮利器
你知道可執行檔的容量其實可以變得更小嗎?而且是在不影響功能以及不需要在使用時增添任何額外動作的情況下達成喔。這樣神奇的事情其實可以靠 UPX 來幫你達成,讓空間節省達人的你為系統壓榨出更多儲存空間。

編輯/王國淵(2007-01-15)

安裝在電腦中的種應用程式一定都含有可執行檔(.EXE),而這些可執行檔其實就是你要啟動該軟體的起源,許多應用程式甚至是只由一個執行檔所構成,如此便可以方便使用者的攜帶。這些可執行檔的檔案容量通常也都不算小,要如何不破壞它的功能並且減少它所佔用的空間呢?就交給 UPX 吧!

UPX 的全名為 Ultimate Packer for eXecutables ,它是一款專門用來壓縮可執行檔案的工具程式,不過可不要以為它是什麼新的東西喔,它可是由 DOS 時代就有的一項技術,算是同類型工具的老大哥呢!不過由於它的持續開發,因此並沒有因為時代的演進而被淘汰,反而在許多主流的應用程式當中都可以見到它的身影。

使用者可以透過 UPX 來將可執行檔案進行壓縮,壓縮過後的檔案大小可能由原本的 20% ~ 90% 不定(視檔案內容可壓縮程度而定),且當你要使用被壓縮過後的檔案時,完全不需要任何的解壓縮動作,只要如往常使用時一樣去執行它,那麼所有原有的功能都是完全不變的喔。這麼方便的工具,相信有許多使用者都不知道它的存在,那麼當你知道後,然到不想來試試它的功能嗎?


2007/09/01 補:
有一些程式壓縮後圖示會壞掉,甚至會影響到關聯的圖示,像ACDSee32...
加上參數
  --compress-icons=0  不壓縮圖示,就好了。

UPX也有圖形介面但用不習慣,不怎好用。
UPX Shell:http://upxshell.sourceforge.net
SourceForge.net:http://sourceforge.net/project/showfiles.php?group_id=90269

另一個類似的壓縮軟體:PECompact2,http://www.bitsum.com/pec2.asp

還是比較習慣UPX 2.03w,以下是詳細參數:
                       Ultimate Packer for eXecutables
    Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006
UPX 2.03w       Markus Oberhumer, Laszlo Molnar & John Reiser    Nov 7th 2006

Usage: upx [-123456789dlthVL] [-qvfk] [-o file] file..

Commands:
  -1     compress faster                   -9    compress better
  --best compress best (can be slow for big files)
  -d     decompress                        -l    list compressed file
  -t     test compressed file              -V    display version number
  -h     give this help                    -L    display software license

Options:
  -q     be quiet                          -v    be verbose
  -oFILE write output to `FILE'
  -f     force compression of suspicious files
  --no-color, --mono, --color, --no-progress   change look

Backup options:
  -k, --backup        keep backup files
  --no-backup         no backup files [default]

Overlay options:
  --overlay=copy      copy any extra data attached to the file [default]
  --overlay=strip     strip any extra data attached to the file [DANGEROUS]
  --overlay=skip      don't compress a file with an overlay

Options for atari/tos:
  --all-methods       try all available compression methods

Options for djgpp2/coff:
  --coff              produce COFF output [default: EXE]
  --all-methods       try all available compression methods
  --all-filters       try all available preprocessing filters

Options for dos/com:
  --8086              make compressed com work on any 8086
  --all-methods       try all available compression methods
  --all-filters       try all available preprocessing filters

Options for dos/exe:
  --8086              make compressed exe work on any 8086
  --no-reloc          put no relocations in to the exe header
  --all-methods       try all available compression methods

Options for dos/sys:
  --8086              make compressed sys work on any 8086
  --all-methods       try all available compression methods
  --all-filters       try all available preprocessing filters

Options for ps1/exe:
  --all-methods       try all available compression methods
  --8-bit             uses 8 bit size compression [default: 32 bit]
  --console-run       enables client/host transfer compatibility
  --no-align          don't align to 2048 bytes [enables: --console-run]

Options for tmt/adam:
  --all-methods       try all available compression methods
  --all-filters       try all available preprocessing filters

Options for vmlinuz/386
  --all-methods       try all available compression methods
  --all-filters       try all available preprocessing filters

Options for watcom/le:
  --le                produce LE output [default: EXE]

Options for win32/pe & rtm32/pe:
  --compress-exports=0    do not compress the export section
  --compress-exports=1    compress the export section [default]
  --compress-icons=0      do not compress any icons
  --compress-icons=1      compress all but the first icon
  --compress-icons=2      compress all but the first icon directory [default]
  --compress-resources=0  do not compress any resources at all
  --keep-resource=list    do not compress resources specified by list
  --strip-relocs=0        do not strip relocations
  --strip-relocs=1        strip relocations [default]
  --all-methods           try all available compression methods
  --all-filters           try all available preprocessing filters

file..   executables to (de)compress

This version supports:
    arm/pe, atari/tos, bvmlinuz/386, djgpp2/coff, dos/com, dos/exe, dos/sys,
    linux/amd64, linux/i386, linux/ppc32, mach/ppc32, ps1/exe, rtm32/pe,
    tmt/adam, vmlinux/386, vmlinuz/386, watcom/le, win32/pe

UPX comes with ABSOLUTELY NO WARRANTY; for details visit http://upx.sf.net

arrow
arrow
    全站熱搜

    ca95 發表在 痞客邦 留言(2) 人氣()