Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. RLE (Run Length Encoding) in C# [modified]

RLE (Run Length Encoding) in C# [modified]

Scheduled Pinned Locked Moved C#
questioncsharpsysadmin
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    earlgraham
    wrote on last edited by
    #1

    My client software gets an RLE encoded TCP message from a Server. I need to decode it so I can use the data. So my question. Does C# already have an RLE decoder? Or will I need to write my own stuff? It does not look hard, but I will feel silly if Someone say there is an extension that handles the work. Thanks PS They say its PackBits style

    Programmer Glenn Earl Graham Austin, TX

    modified on Monday, November 2, 2009 6:17 PM

    L O 2 Replies Last reply
    0
    • E earlgraham

      My client software gets an RLE encoded TCP message from a Server. I need to decode it so I can use the data. So my question. Does C# already have an RLE decoder? Or will I need to write my own stuff? It does not look hard, but I will feel silly if Someone say there is an extension that handles the work. Thanks PS They say its PackBits style

      Programmer Glenn Earl Graham Austin, TX

      modified on Monday, November 2, 2009 6:17 PM

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      What kind of RLE?

      E 1 Reply Last reply
      0
      • L Lost User

        What kind of RLE?

        E Offline
        E Offline
        earlgraham
        wrote on last edited by
        #3

        They(Senior Developers at where I work) say its a "Traditional" form. They check to see if the previous character matches the current. If less than one or two they will attempt a sequence. If a sequence is found, they will write out the length and the sequence. If not the character and run length is attached to the buffer. PackBits they say

        Programmer Glenn Earl Graham Austin, TX

        modified on Monday, November 2, 2009 6:18 PM

        L 1 Reply Last reply
        0
        • E earlgraham

          They(Senior Developers at where I work) say its a "Traditional" form. They check to see if the previous character matches the current. If less than one or two they will attempt a sequence. If a sequence is found, they will write out the length and the sequence. If not the character and run length is attached to the buffer. PackBits they say

          Programmer Glenn Earl Graham Austin, TX

          modified on Monday, November 2, 2009 6:18 PM

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Ok I don't think .NET contains anything to deal with PackBits data.. Fortunately it isn't too hard to write a decompressor for

          1 Reply Last reply
          0
          • E earlgraham

            My client software gets an RLE encoded TCP message from a Server. I need to decode it so I can use the data. So my question. Does C# already have an RLE decoder? Or will I need to write my own stuff? It does not look hard, but I will feel silly if Someone say there is an extension that handles the work. Thanks PS They say its PackBits style

            Programmer Glenn Earl Graham Austin, TX

            modified on Monday, November 2, 2009 6:17 PM

            O Offline
            O Offline
            Oleg Orlov
            wrote on last edited by
            #5

            Try to use: http://rle.codeplex.com/[^]

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups