0

As the title says, is the following process possible without writing to disk in C#?

  • Decode a Base64 string
  • Zip the decoded file
  • Create a Base64 string of the zipped file.

So for example, if my input is 1ab2c3d4e5 which is the base64 encode of a picture, I'd like my output to be 4d89x7g4d4 which is the base64 encode of the ZIP containing the picture.

I have found examples of how to create a ZIP file from a Byte[] array, but these always save the resulted ZIP file on disk, and in my scenario: nothing should be written to disk EVER.

Bert
  • 113
  • 1
  • 2
  • 8
  • 3
    Possible duplicate of (see my answer) [Compression/Decompression string with C#](http://stackoverflow.com/a/17993002/1315444) – fubo Jul 07 '16 at 09:59
  • This is exactly what I needed, I guess I should have looked for 'Compression' instead of just 'ZIP'. Thank you! – Bert Jul 07 '16 at 10:07

0 Answers0