user38349
user38349

Reputation: 3025

How do you convert a file in memory to a byte array?

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

Upvotes: 0

Views: 342

Answers (1)

PatrickSteele
PatrickSteele

Reputation: 14687

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

Upvotes: 1

Related Questions