0

I am using IonicZip to compress video files and store in a blob field. I have the zip file created just need to convert it to a byte array. How is this done without writing to the harddrive?

Thanks,

Dave

1 Answer 1

1

If you can write to a MemoryStream, you can use the "ToArray()" method on the MemoryStream to get a byte array.

Sign up to request clarification or add additional context in comments.

2 Comments

How do you convert the IonicZip file that is in memory to a Memory Stream?
Most ZIP libraries have an overload of their Save method that takes a MemoryStream instead of a filename. If IonicZip provides that, simply create a new MemoryStream, pass it to the Save method then use ToArray() to get the byte array.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.