compression

This is a discussion on compression within the C Programming forums, part of the General Programming Boards category; Arithmetic coding is the only entropy coder which achieves the entropy, that's why it's widely used, it's only back draw ...

  1. #16
    Registered User
    Join Date
    Aug 2003
    Posts
    288
    Arithmetic coding is the only entropy coder which achieves the entropy, that's why it's widely used, it's only back draw is speed, though.
    isnt the entropy the maximum compression data can be compressed to? if so.. why do 5 algos when u can do 1

    also, do you know where i can find any examples of arithmetic coding.. i went to the site you gave me, the explanation is good... but i need a working implementation to test it out and see if its what i should impelement.. in the mean time, ill try and implement it using the explanation
    Last edited by X PaYnE X; 01-11-2005 at 07:26 AM.

  2. #17
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    isnt the entropy the maximum compression data can be compressed to?
    No, to quote http://www.debugmode.com/imagecmp/entrcode.htm,
    By entropy, we mean the amount of information present in the data, and an entropy coder encodes the given set of symbols with the minimum number of bits required to represent them.
    There are certainly other ways to compress then entropy coding.

    also, do you know where i can find any examples of arithmetic coding
    http://www.data-compression.info/Algorithms/AC/
    At the bottom there are some implemntations. You might have to use a range coder because it's faster, and losses little compression. That would be up to what meets your needs for your program.

  3. #18
    Registered User
    Join Date
    Aug 2003
    Posts
    288
    i found this example for arithmetic coding

    http://pesona.mmu.edu.my/~msng/Arithmetic_Coding.html

    i downloaded the source, compiled it, it compresses over 50% which is quite amazing, however it keeps crashing.. not sure why, but it seems perfect for what i was looking for

    and i also found an example of a range coder, works perfectly aswell, loses just a little bit of compression compared to the above algo.. loses about 15 bytes or so..

  4. #19
    Registered User
    Join Date
    Aug 2003
    Posts
    288
    anyway, i managed to fix what was wrong, i compressed the original file ~10kb to 5% of its size.. under 470 bytes.. which is what i was aiming for , if anyone wants to know how, i only used the range encoder that madcow provided the link to, ill try looking for a burrow wheel algo and see if i can get the method madcow described to work, but im quite happy with my results

    thanks to everyone who helped

    edit: lol burrow wheel.. i meant Burrows Wheeler Transform
    Last edited by X PaYnE X; 01-11-2005 at 08:59 AM.

  5. #20
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    I figured you meant Burrows Wheeler Transform. There are certain legal issues to be aware of using that particular technique. Also, as you probably well know by now, the amount you compress has more to do with what you are compressing more than what algorithm you are compressing with. Under certain conditions an RLE compressor may seem like the best thing ever invented.

  6. #21
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    There are certain legal issues to be aware of using that particular technique
    Are you sure?
    From what I've read the two patented algorithms you have to be careful with are LZW and ARI. My understanding was that BWT is in the public domain, and so is the range coder.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple compression algorithm?
    By cyberfish in forum Tech Board
    Replies: 8
    Last Post: 05-02-2008, 10:10 AM
  2. Data Compression
    By Ezerhorden in forum C++ Programming
    Replies: 5
    Last Post: 02-11-2006, 10:19 AM
  3. efficient compression algorithm pls
    By gooddevil in forum C Programming
    Replies: 7
    Last Post: 05-08-2004, 04:33 AM
  4. Compression utility source code
    By Blizzarddog in forum C++ Programming
    Replies: 4
    Last Post: 11-07-2003, 08:15 PM
  5. help: compression algorithms...
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 02-24-2002, 06:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21