flat assembler
Message board for the users of flat assembler.

Index > Main > deflate in fasm?

Author
Thread Post new topic Reply to topic
adnimo



Joined: 18 Jul 2008
Posts: 49
adnimo 30 Dec 2008, 09:21
did anyone code a deflate routine in fasm or ported from another language?

thanks
Post 30 Dec 2008, 09:21
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20343
Location: In your JS exploiting you and your system
revolution 30 Dec 2008, 09:46
I did a long time ago.
Post 30 Dec 2008, 09:46
View user's profile Send private message Visit poster's website Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 30 Dec 2008, 20:17
Do you mean to deflate a RECT?
Post 30 Dec 2008, 20:17
View user's profile Send private message Reply with quote
adnimo



Joined: 18 Jul 2008
Posts: 49
adnimo 30 Dec 2008, 21:26
the deflate algorithm used for PNG decoding, etc.
Post 30 Dec 2008, 21:26
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1902
DOS386 30 Dec 2008, 22:48
> anyone code a deflate routine in fasm

MENUetOS guys maybe ?

> I did a long time ago.

And where do we find it ?
Post 30 Dec 2008, 22:48
View user's profile Send private message Reply with quote
adnimo



Joined: 18 Jul 2008
Posts: 49
adnimo 30 Dec 2008, 22:54
Yes I found some menuet related threads where it seems to be mentioned, I've yet to look at the code though.

I just wanted to know if anyone was interested in this sort of stuff or if anyone coded an optimized deflate, etc. It's quite interesting actually and since the algorithm is used on lots of things, it makes quite a lot of sense to have a go at it.

I'm still learning how the algorithm works, if anyone would like to explain it to me that'll be great Smile
Post 30 Dec 2008, 22:54
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1902
DOS386 30 Dec 2008, 22:56
Deflate is dying ... LZMA is coming ... recently ported from C++++ to plain C , no FASM yet Neutral
Post 30 Dec 2008, 22:56
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20343
Location: In your JS exploiting you and your system
revolution 31 Dec 2008, 01:47
adnimo wrote:
the deflate algorithm used for PNG decoding, etc.
I think you mean inflate. Inflate is much simpler. See the 'puff.c' example in zlib (google it) for an idea of how simple it is.

LMZA is pretty much the same as deflate, it mostly just extends the distances and lengths of things.


Last edited by revolution on 31 Dec 2008, 10:10; edited 1 time in total
Post 31 Dec 2008, 01:47
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4043
Location: vpcmpistri
bitRAKE 31 Dec 2008, 02:57
Checkout PNGLib by MadWizard:
http://www.madwizard.org/programming/projects/pnglib

...it's MASM syntax. Might want to search on...
http://www.asmcommunity.net/board/index.php?topic=4750.0
...for the development threads.
Post 31 Dec 2008, 02:57
View user's profile Send private message Visit poster's website Reply with quote
adnimo



Joined: 18 Jul 2008
Posts: 49
adnimo 31 Dec 2008, 04:17
I think it's deflate actually, at least for PNGs. What makes the difference is the filtering algorithm, one of the easiest ones is called the Paeth predictor.
Post 31 Dec 2008, 04:17
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20343
Location: In your JS exploiting you and your system
revolution 31 Dec 2008, 04:25
Deflate is the compressor, inflate is the expander. If you want to decode PNG files (for display) then you use inflate. If you want to encode PNG files (to store on disk) then you use deflate.
Post 31 Dec 2008, 04:25
View user's profile Send private message Visit poster's website Reply with quote
adnimo



Joined: 18 Jul 2008
Posts: 49
adnimo 31 Dec 2008, 06:57
Right. I do want to png-encode my game screenshots. And I do want to load png assets as well. But this algorithms are useful for other things as well.
Post 31 Dec 2008, 06:57
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 31 Dec 2008, 07:05
revolution wrote:
LMZA is pretty much the same as LZW, it mostly just extends the distances and lengths of things.
Lempel-Ziv-Welch use distance-length backrefs? Really?

_________________
"Don't belong. Never join. Think for yourself. Peace." – Victor Stone.
Post 31 Dec 2008, 07:05
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20343
Location: In your JS exploiting you and your system
revolution 31 Dec 2008, 08:56
Sorry, just LZ, or is it LZ77? I tend to get them mixed up.

Okay, I checked with my website, they are LZ77 derivatives. LZW is a LZ78 derivative. Ah, so confusing.
Post 31 Dec 2008, 08:56
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1902
DOS386 01 Jan 2009, 12:51
> LMZA is pretty much the same as deflate, it mostly just extends the distances and lengths of things.

Right. Not as LZ, not LZ77, not LZ78, not LZW84. And LZMA is more smart in searching and uses Range instead of Huffman.

> Checkout PNGLib by MadWizard

COOL. The syntax isn't that ideal, heh, but at least there are binaries included.
Post 01 Jan 2009, 12:51
View user's profile Send private message Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 12 Jan 2009, 05:55
DOS386 wrote:
Deflate is dying ... LZMA is coming ... recently ported from C++++ to plain C , no FASM yet Neutral


can you provide link to plain c version? thanks

_________________
[not enough memory]
Post 12 Jan 2009, 05:55
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1902
DOS386 12 Jan 2009, 08:36
Vasilev Vjacheslav wrote:
you provide link to plain c version? thanks


Just get Igor's latest LZMA SDK Wink

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 12 Jan 2009, 08:36
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.