private static void GenerateStandaloneResource(string fullPathName, Stream resourceStream)
{
// simply do a copy for the stream
using (FileStream file = new FileStream(fullPathName, FileMode.Create, FileAccess.Write))
{
const int BUFFER_SIZE = 4096;
byte[] buffer = new byte[BUFFER_SIZE];
int bytesRead = 1;
while (bytesRead > 0)
{
bytesRead = resourceStream.Read(buffer, 0, BUFFER_SIZE);
file.Write(buffer, 0, bytesRead);
}
}
}