LZW Compression

Share your advanced PureBasic knowledge/code with the community.
hellhound66
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Feb 21, 2006 12:37 pm

LZW Compression

Post by hellhound66 »

Closed.
Last edited by hellhound66 on Sun Mar 09, 2008 10:32 pm, edited 1 time in total.
Amnesty
User
User
Posts: 54
Joined: Wed Jul 04, 2007 4:34 pm
Location: Germany

Post by Amnesty »

Good work!

BTW: Patent expired in 2004 for Europe.
User avatar
Demivec
Addict
Addict
Posts: 4270
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Post by Demivec »

Amnesty wrote:Good work!

BTW: Patent expired in 2004 for Europe.
Patent also expired June 3, 2003 for U.S.A.
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

Patent applied by Hroudtwolf ^^


Good job @Hellhound
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

Hroudtwolf wrote:Patent applied by Hroudtwolf ^^
:lol:
Dare2 cut down to size
localmotion34
Enthusiast
Enthusiast
Posts: 665
Joined: Fri Sep 12, 2003 10:40 pm
Location: Tallahassee, Florida

Post by localmotion34 »

just a note:

this function is great, however, it takes nearly forever to compress a bitmap of dimensions greater than 800 pixels.

bitmaps bigger than 1000 pixels actually fail to return out of the compression routine.

Code: Select all

!.WHILE status != dwPassedOut
! Invoke AllocateDrink, dwBeerAmount
!MOV Mug, Beer
!Invoke Drink, Mug, dwBeerAmount
!.endw
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

Hroudtwolf wrote:Patent applied by Hroudtwolf ^^


Good job @Hellhound
too late, I did it last year :)

Thanks for the code,
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

Yes, thanks!
Dare2 cut down to size
hellhound66
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Feb 21, 2006 12:37 pm

Post by hellhound66 »

Code: Select all

Define.l Index = IsTable(*InfoTable,CurrentTableEntry,First,Second) 
This line slows it down like hell. I didn't optimize it at all ( as I wrote in the first post). Every time I must search the whole array. Normally I would include another array of arrays to sort the indices to the first entry values.
I think so I would be able to improve it to 0.5MB a second.
Dr_Wildrick
User
User
Posts: 36
Joined: Fri Feb 23, 2007 8:00 pm
Location: New York

Removed

Post by Dr_Wildrick »

Removed
Last edited by Dr_Wildrick on Sun Feb 24, 2008 6:01 am, edited 1 time in total.
hellhound66
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Feb 21, 2006 12:37 pm

Post by hellhound66 »

Thanks for the information. I will look it up some time (LZS).
Perhaps I will upgrade the PB code as I did it with my C++ code (that I posted in the same thread, have a look).
Dr_Wildrick
User
User
Posts: 36
Joined: Fri Feb 23, 2007 8:00 pm
Location: New York

Removed

Post by Dr_Wildrick »

Removed
Last edited by Dr_Wildrick on Sun Feb 24, 2008 6:01 am, edited 1 time in total.
hellhound66
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Feb 21, 2006 12:37 pm

Post by hellhound66 »

Aah, LHA. Of course I know LHA. I used it for years ^^.
And 16 years ago, I started progamming with Pascal, so this would be no big deal.
Unfortunately, my free time runs low, becuase of my job (soldier) and my family, that has got priority one for me.
Thanks for the detailed information, Doc.
Post Reply