NetEZ.com NetEZ Community
Enter City & State or US Zip Code:
Change your local weather options
Google
WWW NetEZ.com

NetEZ.com Forum Index  
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

blog: LZW compression

 
Post new topic   Reply to topic    NetEZ.com Forum Index -> xplorer˛ Professional
View previous topic :: View next topic  
Author Message
nikos
Moderator
Moderator


Joined: 07 Feb 2002
Posts: 12346
Location: UK

PostPosted: Sun Jan 24, 2010 4:43 am    Post subject: blog: LZW compression Reply with quote

here's the comment area for today's blog post found at
http://zabkat.com/blog/24Jan10-lzw-compression-code.htm
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Kilmatead
Gold Member
Gold Member


Joined: 30 Sep 2008
Posts: 829
Location: Dublin

PostPosted: Sun Jan 24, 2010 5:35 am    Post subject: Reply with quote

Back when I was teenager learning to program (in the DOS days) I thought it would be fun to experiment writing my own compression algorithm... 7-zip was the only kid on the block back then (or at least an early incarnation of it), and I was curious as to how it worked so well.

My approach was the boring bit-pattern recognition type (as that was the only one that made sense to me), and no matter how much I tweaked it, Zip always performed marginally better, which annoyed me no end - and this was only on text files, where at least you have a chance of some success.

Introduce the concept of recursive bit-patterning to an .EXE and you might as well take up yoga and try to get your legs in a pretzel instead of your brain.

It was a fun experiment, though.

A ceiling of ratios seems to have plateaued these days given the strides video compression has made... say, ripping a DVD with a combination of DVD Shrink and Handbrake software, you can end up with a decent quality 400-500 MB file... shove that into 7-Zip or WinRAR and you'll gain virtually nothing.

It's surprising the quality of video that can be achieved using the (increasingly popular) MKV container (Matroska) over the ageing AVI containers of days gone by.
Back to top
View user's profile Send private message
nikos
Moderator
Moderator


Joined: 07 Feb 2002
Posts: 12346
Location: UK

PostPosted: Sun Jan 24, 2010 5:40 am    Post subject: Reply with quote

Quote:
writing my own compression algorithm

well done senjor armstrong! Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Kilmatead
Gold Member
Gold Member


Joined: 30 Sep 2008
Posts: 829
Location: Dublin

PostPosted: Sun Jan 24, 2010 5:48 am    Post subject: Reply with quote

The best part was that I got to name my own filetype extension.

It's surprising how many different ways a 13 year old boy can think up compression acronyms that conform to spell .SEX files.  (Sequentially Executed Cross-patterning [X]!)

Hey, I was a teenager!  (My teacher in school was impressed and distraught at the same time, as they sanctioned the project in the first place.  I had the last laugh.)


Last edited by Kilmatead on Sun Jan 24, 2010 6:06 am; edited 1 time in total
Back to top
View user's profile Send private message
Kilmatead
Gold Member
Gold Member


Joined: 30 Sep 2008
Posts: 829
Location: Dublin

PostPosted: Sun Jan 24, 2010 5:58 am    Post subject: Reply with quote

...following on the topic of file extensions, I'm bemused these days at the number of developers who "cheat" and just use ZIP's under a different name... spend any time playing around with Mozilla products and you'll find that all .XPI and .JAR files are nothing more than renamed .ZIP's.

I always bemoan the lack of imagination these days.  Such an opportunity lost! Very Happy
Back to top
View user's profile Send private message
Mr.Pleasant
Silver Member
Silver Member


Joined: 29 Dec 2006
Posts: 242
Location: Utrecht, NL

PostPosted: Sun Jan 24, 2010 8:50 am    Post subject: Reply with quote

Funny you came up with LZW compression. Anyone in the graphic industry (or just familiar with Photoshop) knows that LZW can be used to compress the size of your TIFF files. It's been tied to this particular field that I wasn't even aware of its usefulness in other fields!
Back to top
View user's profile Send private message
nikos
Moderator
Moderator


Joined: 07 Feb 2002
Posts: 12346
Location: UK

PostPosted: Sun Jan 24, 2010 9:21 am    Post subject: Reply with quote

it's also the compression behind GIFs and (probably) was protected by patents until not that long ago
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
peregryne
New Member
New Member


Joined: 26 Aug 2008
Posts: 11

PostPosted: Mon Jan 25, 2010 3:41 pm    Post subject: Reply with quote

Nikos - very cool.  I wrote a really simple RLE compressor, since what I needed to compress had lots of single-character runs, but this could be very useful for some real compression.  thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NetEZ.com Forum Index -> xplorer˛ Professional All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP