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. Text Compression Algorithm

Text Compression Algorithm

Scheduled Pinned Locked Moved C#
csharpalgorithmsxmlquestion
4 Posts 4 Posters 6 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.
  • J Offline
    J Offline
    Jonathan Tan
    wrote on last edited by
    #1

    I need a text compression algorithm (preferable open-source etc.) to compress and decompress a few XML files for my project. Anyone has any sources? It doesn't have to be in C# but if possible it should be easily ported. I will probably port it (and not use the binary).

    W S D 3 Replies Last reply
    0
    • J Jonathan Tan

      I need a text compression algorithm (preferable open-source etc.) to compress and decompress a few XML files for my project. Anyone has any sources? It doesn't have to be in C# but if possible it should be easily ported. I will probably port it (and not use the binary).

      W Offline
      W Offline
      wobble
      wrote on last edited by
      #2

      How big are the XML Files? Is it worth it? Why do you want to compress? - for reduced storage? or - increased transmission speed? or - encryption? If you can answer the above questions with some really good reasons, then you can use some sort of "Huffman compression algorithm". You can create a functions like: - string compress(string fatstring) - string decompress(string thinstring) If you get this working, can you email me a copy. Thanks. Keep up the good work. Regards Wooble

      1 Reply Last reply
      0
      • J Jonathan Tan

        I need a text compression algorithm (preferable open-source etc.) to compress and decompress a few XML files for my project. Anyone has any sources? It doesn't have to be in C# but if possible it should be easily ported. I will probably port it (and not use the binary).

        S Offline
        S Offline
        Stephane Rodriguez
        wrote on last edited by
        #3

        You'll easily find projects like xmill (AT&T but free) and xmlppm (sourceforge). Remember that XML compression should be at the transport level, not at the application level. In other words, that's not a problem that on the network stack XML is made binary. But that really hurts if for any app or for the end user XML is not human-readable. That said, Xml compression is well achieved : - because, by design, element names and attributes appear many times - because LOV (List Of Values) may appear many times too (for the exact same reasons than with a SQL join)/


        And I swallow a small raisin.

        1 Reply Last reply
        0
        • J Jonathan Tan

          I need a text compression algorithm (preferable open-source etc.) to compress and decompress a few XML files for my project. Anyone has any sources? It doesn't have to be in C# but if possible it should be easily ported. I will probably port it (and not use the binary).

          D Offline
          D Offline
          Daniel Turini
          wrote on last edited by
          #4

          Try SharpZipLib[^] Concussus surgo. When struck I rise.

          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