mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 12:44:46 +01:00
[internal] - Use Stream.CopyTo() instead loop thx @xylographe
This commit is contained in:
parent
a98a00e13c
commit
3366abdb44
@ -20,12 +20,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
using (var fd = new MemoryStream())
|
||||
using (Stream csStream = new GZipStream(File.OpenRead(fileName), CompressionMode.Decompress))
|
||||
{
|
||||
int nRead;
|
||||
while ((nRead = csStream.Read(buffer, 0, buffer.Length)) > 0)
|
||||
{
|
||||
fd.Write(buffer, 0, nRead);
|
||||
}
|
||||
csStream.Flush();
|
||||
csStream.CopyTo(fd);
|
||||
buffer = fd.ToArray();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user