Anybody knows some good encode/decode algorithm?

I want a good compression ratio algo with it's source, at least
decode source.

and if possible In "C" though i might convert from any lang to C.
somethimes, algos so difficult to convert easily.

Anyone could show me?
Posted on 2002-07-04 19:38:39 by muzidowa
huffman in pascal... quick google tryvsearching for huffman or LZ...

http://www.osirusoft.com/tplzh031.zip
Posted on 2002-07-04 20:40:48 by NervGaz
Jeremy Collake published the source of his compression algo that he uses in PEcompact.

Search google for "collake" of "pecompact" and you should find his site. The code is in assembler.

Regards,

hutch@movsd.com
Posted on 2002-07-04 21:23:24 by hutch--
I have LZ77 implemented, so if you would like I can gear up my asss and put them in order from the mess they are in now.
Posted on 2002-07-04 21:44:18 by comrade
Definitely LZO (do a Google Search.. it's in the same site that hosts the UPX program).
Posted on 2002-07-05 02:41:04 by Maverick
Better use the search engine next time :tongue:

http://www.asmcommunity.net/board/index.php?topic=2031&highlight=quick
Posted on 2002-07-05 03:32:09 by bazik
Definitely jibz' aPLib - http://home19.inet.tele.dk/jibz/apack/ .
Or, well, "definitely". It depends on what you want to do, of course.
But if nice compresssion ratio + fast unpack speed + relatively slow
packing speed sounds like good parameters to you, definitely give
aPLib a go.
Posted on 2002-07-05 07:12:38 by f0dder
I am quite sure UPX uses NRV... What is that?
Posted on 2002-07-05 12:34:44 by comrade
Hi comrade, you wrote: I am quite sure UPX uses NRV... What is that?

NRV stands for "Not Really Vanished", and is a project for a newer and improved LZO library (it's explictly called "the LZO successor"). AFAIK it has not been publicly released yet, though.

Hi f0dder: I tested them all, and although aPLib is good++, LZO is the very best (for speed, but does also a very decent compression job). If you set max compression ratio, aPLib can be *very* slow. If there wasn't LZO, though, aPLib would be my best overall advice (besides in some circumstances where UCL is better, and goes in the middle of these two mentioned libraries).

I don't have the exact numbers here, since some days ago I moved (and will stay here two months) to my girlfriend's house, since her parents are away on holiday. Next time I do a visit to my house I hope to remember to pick up that text file from my PC. There I made a comparation of various publicly available compressor/decompressors.
Posted on 2002-07-05 13:19:33 by Maverick
Thanks Maverick,

That would be nice since I'm asking myself what "publicy available" compressor to use...
My present choice is JCALG1 from Jeremy Collake because all is well implemented, directly and easily usable and incredibily tiny (the "small" implementation is less than 100 bytes if I remember well)...
The "bad point" (for my current project, heh) is that the compressor of my program must be in ANSI C (portable) while the decompressor has to be in win32/assembly for minimum size and maximum efficiency...
I was asking myself if I would port JCALG1 compression code to C (I don't know if it is "endianless", somebody knows?) but it seems that aplib comes with a C source... very good point for me (it would save me time to not have to reimplement the compressor...)

*EDIT* : I checked and aplib has only a C decompressor and not C compressor... sad :(
Posted on 2002-07-05 13:28:49 by JCP
look for any PPM variants...these are one of the best compression algorithms around. http://compression.ca/act-summary.html - look here for comparisons. Remember entropy, rk and eri32 are PPM variants or uses PPM on their algorithms ...

Personally, I use PPMZ2 together with TAR for archiving my files...

I have the source for PPMZ2 in C but it's way too big ... search google, you'll find it.
Posted on 2002-07-05 16:15:04 by stryker
hi

you can try z_code, by z0mbie. the decompression routine is under 180 bytes, and the compression under 380 bytes, and dont need extra memory or like.

input buffer, output buffer and size: is all you will need :)

you can find it in my page, or in z0mbie page. use google.

ancev

ps: the compression rate is pretty good. just a bit below aplib
Posted on 2002-07-05 20:08:45 by ancev
This is a nice site about compression:

http://www.arturocampos.com/abstracts.html

There you can find tutorials and links. The tutorials
include examples in assembly and C.
Posted on 2002-07-05 21:55:18 by n u M I T_o r
The thing I don't like about LZO and friends is that it's GPL...
it's a disease :). Also the code (at least the decompressors) is pretty
messy. Too bad you don't get compressor source for aPLib, but at
least it is not GPL, and you can use the decompressor even in commercial
apps without having to pay. Doesn't jcalg use the aplib data format
by the way?
Posted on 2002-07-06 08:40:38 by f0dder
Originally posted by Maverick I don't have the exact numbers here, since some days ago I moved (and will stay here two months) to my girlfriend's house, since her parents are away on holiday. Next time I do a visit to my house I hope to remember to pick up that text file from my PC. There I made a comparation of various publicly available compressor/decompressors.
Here's the file.. it's a bit cryptic because I wrote it for myself and didn't think anybody would have ever been interested into it (myophia rulez).

Anyway, I crunched and decrunched a test file and measured the CPU cycles it took for each algorithm. Then I also measured the compression ratio. It's quite self-commenting. Else I'm here to reply to any question.

PS: test machine was an Athlon-XP 1800+.
Posted on 2002-07-08 11:13:19 by Maverick
Posted on 2002-07-18 00:36:00 by comrade