DELPHI ÎļþѹËõ¼ÓÃÜ
1¡¢ ϵͳ¹¦ÄÜ
1£©¡¢Êý¾ÝѹËõ
ʹÓÃDELPHIÌṩµÄÁ½¸öÁ÷ÀࣨTCompressionStreamºÍTDecompressionStream£©À´Íê³ÉÊý¾ÝµÄѹËõºÍ½âѹËõ¡£
2£©¡¢Êý¾Ý¼ÓÃÜѹËõ
ͨ¹ýDelphi±à³ÌÖГÁ÷”µÄÓ¦ÓÃʵÏÖÊý¾Ý¼ÓÃÜ£¬Ö÷Òª²ÉÓÃTstreamµÄÁ½¸öÅÉÉúÀàTfilestream¡¢Tmemorystream À´Íê³ÉµÄ£»ÆäÖÐÊý¾ÝѹËõ²¿·Ö²ÉÓÃ1£©µÄʵÏÖ·½·¨
3£©¡¢Ë«»÷ѹËõÎļþ×Ô¶¯¹ØÁª½âѹ
ͨ¹ý¸ü¸Ä×¢²á±íµÄʵÏÖÀ©Õ¹ÃûÓë³ÌÐòÎļþµÄ¹ØÁª£¬Ö÷Òª²ÉÓÃTregistry£»²¢ÇÒ£¬APIº¯ÊýSHChangeNotifyʵÏÖ×¢²áЧ¹ûµÄÁ¢¼´³ÊÏÖ¡£
4£©¡¢¿ÉÉú³É×Ô½âѹÎļþ
×Ô½âѹµÄÎļþʵÏÖÊý¾ÝѹËõ1£©ÓëÊý¾Ý¼ÓÃÜѹËõ2£©µÄ×Ô¶¯½âѹ£»²¢ÇÒ£¬Í¨¹ý×ÊÔ´ÎļþµÄʹÓÃʵÏÖ¿ÉÖ´ÐеÄ×Ô½âѹÎļþÓëÊý¾ÝÎļþµÄºÏ²¢£¬À´Íê³ÉÊý¾ÝµÄ×Ô½âѹʵÏÖ¡£
2¡¢ ϵͳʵÏÖ
2.1¡¢¹¤×÷ÔÀí
2.2¡¢¹Ø¼ü¼¼ÊõµÄ½²Êö
£¨Ò»£©ZLIB
1£©¡¢»ùÀà TCustomZlibStream£ºÊÇÀàTCompressionStreamºÍTDecompressionStream ÀàµÄ»ùÀ࣬ËüÖ÷ÒªÓÐÒ»¸öÊôÐÔ£º OnProgress£¬ÔÚÀà½øÐÐѹËõ»ò½âѹËõµÄ¹ý³ÌÖлᷢÉúÕâ¸öµÄʼþ ¡£
¸ñʽ£ºProcedure OnProgress (Sender: TObject); dynamic;
2£©¡¢Ñ¹ËõÀàTCompressionStream£º³ýÁ˼̳ÐÁË»ùÀàµÄOnProgress ÊôÐÔÍ⣬ÓÖÔö¼ÓÁËÒ»¸öÊôÐÔ£ºCompressionRate£¬ËüµÄ¶¨ÒåÈçÏ£º
Property CompressionRate: Single read GetCompressionRate;
ͨ¹ýÕâ¸öÊôÐÔ£¬¿ÉÒԵõ½Ñ¹Ëõ±È¡£
ËüµÄ¼¸¸öÖØÒªµÄ·½·¨¶¨ÒåÈçÏ£º
Constructor TCompressionStream.Create (CompressionLevel: TCompressionLevel; Dest: TStream);
ÆäÖУºTcompressionLevel£¨Ñ¹ËõÀàÐÍ£©£¬ËüÓÉÈçϼ¸¸ö¶¨Ò壺
¡¡¡¡¡¡£±£©¡¢ clNone £º²»½øÐÐÊý¾ÝѹËõ£»
¡¡¡¡¡¡£²£©¡¢ clFastest£º½øÐпìËÙѹËõ£¬ÎþÉüѹËõЧÂÊ£»
¡¡¡¡¡¡£³£©¡¢ clDefault£º½øÐÐÕý³£Ñ¹Ëõ£»
¡¡¡¡¡¡£´£©¡¢ clMax£º ½øÐÐ×î´ó»¯Ñ¹Ëõ£¬ÎþÉüËٶȣ»
Dest£ºÄ¿µÄÁ÷£¬ÓÃÓÚ´æ·ÅѹËõ¹ýµÄÊý¾Ý¡£
Function TCompressionStream.Write (const Buffer; Count: Longint): Longint;
ÆäÖУºBuffer£ºÐèҪѹËõµÄÊý¾Ý£»
¡¡¡¡¡¡Count: ÐèҪѹËõµÄÊý¾ÝµÄ×Ö½ÚÊý£»
º¯Êý·µ»ØдÈëÁ÷µÄ×Ö½ÚÊý¡£
×¢Ò⣺ѹËõÀàTCompressionStreamµÄÊý¾ÝÖ»ÄÜÊÇдÈëµÄ£¬Èç¹ûÊÔͼ´ÓÆäÄÚ²¿¶ÁÈ¡Êý¾Ý£¬½«·¢ÉúÒ»¸ö"Error "Òì³£¡£ÐèҪѹËõµÄÊý¾Ýͨ¹ý·½·¨ WriteдÈëÁ÷ÖУ¬ÔÚдÈëµÄ¹ý³ÌÖоͱ»Ñ¹Ëõ£¬²¢±£´æÔÚÓɹ¹Ô캯ÊýÌṩµÄÄÚ´æÁ÷£¨TmemoryStream£©ÖÐ,ͬʱ´¥·¢ OnProcess ʼþ¡£
3£©¡¢ ½âѹËõÀà TDecompressionStream :ºÍѹËõ
Ïà¹ØÎĵµ£º
delphiÖÐapplication.processmessagesµÄ×÷ÓÃ
procedure TForm1.Button2Click(Sender: TObject);
var
I, J, X, Y: Word;
begin
I := 0;
J := 0;
while I < 64000 do
begin
Randomize;
& ......
±±¾©ÌÚ¶ÈÍøÂç¿Æ¼¼ÓÐÏÞ¹«Ë¾
µØÖ·:±±¾©º£µíÇøѧÇå·
µç»°:82755789
Òò¹¤×÷ÐèÒª,ÏÖÃæÏò±±¾©ÕÐƸÒÔÏÂְλ.
DelphiÈí¼þ¹¤³Ìʦ
1¡¢¾«Í¨Delphi¿ª·¢£¬ÊìϤVCL¼Ü¹¹£¬´úÂë·ç¸ñÁ¼ºÃ¡£
2¡¢ÓÐÁ¼ºÃµÄÍŶӺÏ×÷¾«Éñ£¬¸»Óд´Ð¾«Éñ;
3¡¢ÊìϤÍøÂç±à³Ì£¬¶ÔIndy×é¼þ£¬Socket¿ª·¢ÓÐÒ»¶¨µÄÁ˽â;
4¡¢ÊìϤÃæÏò¶ÔÏó±à³Ì˼Ïë,ÓÐ×é¼þ»ò¿Ø¼þ±à ......
±êÌâ
Delphi¶à²ã¿ª·¢·½°¸±È½Ï £¨×ªÔØ£©
¹Ø¼ü×Ö
Delphi¶à²ã¿ª·¢·½°¸±È½Ï
³ö´¦
·½°¸->
Midas
DCOM
COM+
ASTA
RemoteObject
.NET
ÌṩÕß
Borland
΢Èí
΢Èí
http://www.astatech.com
http://www.remobjects.com
΢Èí
ºËÐļ¼Êõ
COM
COM
COM
ASTA×Ô¼ ......
Delphi ÊÇÐÂÒ»´ú¿ÉÊÓ»¯¿ª·¢¹¤¾ß£¬Ëü¾ßÓй¦ÄÜÇ¿´ó¡¢¼ò±ãÒ×ÓúʹúÂëÖ´ÐÐËٶȿìµÈÌص㣬ÊÇÈ«Çò¹«ÈϵĿìËÙÓ¦Óÿª·¢¹¤¾ß¼¼ÊõµÄÏÈÇýÕߣ¬ËüÔ½À´Ô½ÔÚ¹¹¼ÜÆóÒµÐÅϢϵͳ·½Ãæ·¢»Ó×ÅÖØÒª×÷Óá£ÓÉÓÚDelphi ÕâЩÏÔÖøÌص㣬Ðí¶à³ÌÐòԱѡÔñDelphi×÷Ϊ¿ª·¢¹¤¾ß±àÖƸ÷ÖÖÓ¦ÓóÌÐò¡£µ«ÊÇ£¬ÁîÈËÍïϧµÄÊÇDelphiûÓÐ×Ô´ø´®¿Ú ......