I have the following code:
using (var fs = new FileStream(@"C:\dump.bin", FileMode.Create))
{
income.CopyTo(fs);
}
income
is a stream that I need to save to disk, the problem is that I want to ignore the last 8 bytes and save everything before that. The income stream is read only, forward only so I cannot predict its size and I don't want to load all the stream in memory due to huge files being sent.
Any help will be appreciated.