Run Length encoding

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • muponisi
    New Member
    • May 2010
    • 2

    Run Length encoding

    How can I code the Run Length encoding using C++?
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    Please start by describing the run-length encoding protocol you wish to use.

    Comment

    • muponisi
      New Member
      • May 2010
      • 2

      #3
      Originally posted by donbock
      Please start by describing the run-length encoding protocol you wish to use.
      It must compress text files and bmp files and it must be done in C++. looking forward to your respond

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        No that is what you want to use the run length encoding algorithm for; not what the algorithm actually does.

        donbock is asking if you have any knowledge of what the run length encoding algorithm does because knowing what it does is certainly a precursor to knowing how to implement it.

        If you don't know what it does, i.e. you are just throwing the name round then you should try a little research first. I imagine Wikipedia has a page on this algorithm.

        Comment

        • Banfa
          Recognized Expert Expert
          • Feb 2006
          • 9067

          #5
          Oh and by the way, while run length encoding may compress the size of some relatively simple bit maps I would be surprised if it compressed any text file. In fact I imagine that on the whole you would get an increase in size for text approximately to 2 times the original size.

          Comment

          • donbock
            Recognized Expert Top Contributor
            • Mar 2008
            • 2427

            #6
            Run-length encoding is a family of compression algorithms. It sounds like you are not constrained to use any particular member of that family, so you can use whichever particular algorithm is easiest to implement.

            Why don't you do a little research and get back to us regarding the algorithm you chose.

            Comment

            Working...