Results 1 to 5 of 5

Thread: a compression algorythm - i need one.

  1. #1

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    I have a program that, in the course of doing its function, stores files at the bit level hidden in a windows bitmap.
    The program reads the entire bitmap in memory and the entire file in memory then does its work then spits out the new bitmap.
    The thing is i would like to be able to compress the file before inserting it, and uncompress it again later. It doesn't have to be a super compression routine. But for obvious reasons, it can't be a lossy one. I thought of the old "find a common string and replace with a marker" but i have no clue of how to search the file fast enough to accomplish this in a reasonable amount of time.

    Does anyone have any source code in vb for a simple compression routine (preferred) or a not-so-simple one i can puzzle over?

    For more obvious reasons, i'd like it to be a free compression routine.

    Anyone got one?
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    zLib is free, and the algorithm it uses is well documented in the RFCs Unfortunately, it definitely takes puzzling over There's the new bzip as well...not sure how that compares -- could be interesting to look at.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    If you want to impliment your own, search the net for LZ77 and LZ78, these are fairly straight forward algorithms that you can use yourself, LZW is better and used in GIF but it needs to be licensed so if your selling your app you could get into hot water with Unisys.

    I'm working on a few similar things at the moment.
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  4. #4

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    do you have a link to zlib or the docs?
    I'm staying away from the .gif one for that very reason.
    Hence i asked for a "free" one.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    www.libpng.org and follow the zlib link.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width