hello, all

This is an implementation of the Lempel-Ziv 77 compression algorithm written by comrade in Win32 assembly. I did a test code.
when the z1_2. exe compresses a exe file,  the sizes of compressed file became bigger than the original exe file. but other type files(*.txt,*.doc,*.bmp) works ok.
what's wrong of my usage?

regards

Attachments:
Posted on 2005-07-24 09:28:27 by dcskm4200
the implementation is lame and it probably could not find any recurrences in the EXE file (which is most likely already compressed with UPX or like)
Posted on 2005-07-24 10:17:16 by comrade
hello, comrade
Thanks you.
it is efficacious about bmp,dwg file. here is a tested result of comparing with a commercial soft winRAR.

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?the Lempel-Ziv 77?
=============================================? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?pdf? ? ? ?? doc? ? ? ? ?bmp? ? ? ?dwg? ? ? ? ?exe
original file sizes? ? ? ? ? ? ? ?4.815M? ? 9.461M? ?1.583M? ?2.095M? 17.199M
compressed file sizes? ? ? ? 5.192M? ? 7.972M? ?0.061M? ?0.935M? 18.914M
percentage? ? ? ? ? ? ? ? ? ?? ?107.8%? ?84.3%? ? ?3.85%? ? 44.63%? 109.97%
=============================================

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?winRAR
**********************************************************? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?pdf? ? ? ?? doc? ? ? ? ?bmp? ? ? ?dwg? ? ? ? ?exe
original file sizes? ? ? ? ? ? ? ?4.815M? ? 9.461M? ?1.583M? ?2.095M? 17.199M
compressed file sizes? ? ? ? 4.417M? ? 6.008M? ?0.013M? ?0.622M? 16.492M
percentage? ? ? ? ? ? ? ? ? ?? ? 91.73%? ?63.5%? ? ?0.82%? ? 29.69%? 95.89%
**********************************************************

regards
Posted on 2005-07-24 20:34:38 by dcskm4200
dcskm4200,
My math is pretty bad but how can you compress something to more than 100% of its size ?
I think there is an issue in the math.
Posted on 2005-07-28 16:50:01 by James_Ladd
I think it means, that the "compressed" file actually grew instead of shrinking ;)
Posted on 2005-07-28 16:58:08 by ti_mo_n
James_Ladd, you need to check back with your high-school science class, and realize that some materials expand when heated, while others contract.
Posted on 2005-07-28 18:03:57 by comrade