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. Problems in Deserialization after decompression

Problems in Deserialization after decompression

Scheduled Pinned Locked Moved C#
helpalgorithmstutorial
1 Posts 1 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.
  • A Offline
    A Offline
    Anindya Chatterjee
    wrote on last edited by
    #1

    Hi, I have very peculiar problem regarding GZipStream class under System.IO.Compresion namespace. The problem is like this: I have an ArrayList with large amount of data. I want to serialize it after compressing it. I used the following algorithm: 1. Create a MemoryStream 2. Serialize the ArrayList into that stream. 3. Compress the memorystream 4. Write the compressed stream into a file. this runs ok without any error. but problems occur when I want to deserialize it after decompression as follows: 1. Create a file stream from the file. 2. Decompress it into a memorystream 3. Deserialize the stream into an ArrayList exception is thrown here, it say somesort of like this: Binary header broken cannot deserialize from the stream. This is a peculiar problem, the compression process is not reversible! I don't know how to get rid of this problem. Anyone please help me. Thank's in advance....... With regards, Anindya Chatterjee

    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