Skip to content

Commit b929d22

Browse files
committed
ModApi.UpdateManager: increase buffer size in DownloadClient to 4096
This matches .NET's default buffer size: https://github.com/microsoft/referencesource/blob/f7df9e2399ecd273e90908ac11caf1433e142448/mscorlib/system/io/filestream.cs#L398
1 parent 716ca49 commit b929d22

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ModApi.UpdateManager/DownloadClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ private void copyStreamWithProgress(Stream inputStrem, Stream outputStream)
1818
{
1919
long streamLength = inputStrem.Length;
2020
long totalBytesRead = 0;
21-
byte[] buffer = new byte[1024];
21+
byte[] buffer = new byte[4096];
2222
int bytesRead = 0;
2323
int percentageDownloaded = 0;
2424
int percentage;

0 commit comments

Comments
 (0)