Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Software-Projekte der Mitglieder (https://www.delphipraxis.net/26-software-projekte-der-mitglieder/)
-   -   retCompress - schnelle Kompression für strings (https://www.delphipraxis.net/48306-retcompress-schnelle-kompression-fuer-strings.html)

retnyg 23. Jun 2005 13:21


retCompress - schnelle Kompression für strings
 
http://krazz.net/retnyg/retCompress.zip
Zitat:

RetCompress unit
================================================== ===========
author: retnyg @ krazz.net/retnyg
================================================== ===========

License: use this code whereever you want, but keep credits

================================================== ===========

uses a undocumented API of ntdll to compress data.
compression rate is similar to ZIP, but a lot faster.

disadvantage: needs winNT, API may be changed or abandoned
in the future.

i added also the routines Inflate/Deflate, which just
packs sequential #0's, which is quite effective when
packing small exe's.

take also a look at the function HardCodedString, it's
commented out, because it needs the command inttostr,
which is in sysutils. It can be used to Hardcode a binary
string into a delphi app, such as to generate an exe by code.

example application can be found here:
http://www.delphipraxis.net/internal...ct.php?t=54428
( batch2exe, also written by me )

Information about the used Api Commands can be found here:

http://undocumented.ntinternals.net/

retnyg 26. Aug 2005 06:02

Re: retCompress - schnelle Kompression für strings
 
neu: nun ist ein demo-programm dabei, mit dem man dateien per drag und drop komprimieren kann.
in der form.caption wird dann die erreichte kompression angezeigt.
ein bug wurde beseitigt (bei unkomprimierbaren dateien wie jpg wurden leere files geschrieben)
ausserdem ist nun eine funktion zum komprimieren von dateien vorhanden.

die kompressionsroutine ist rund 15 mal schneller als winRar, und 10 mal schneller als winZip.
dafür werden nicht ganz so hohe kompressionsraten erreicht.


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:10 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz