```
var stream = new MemoryStream();
stream.Write([1, 2, 3]); // some data is written to the memory stream
stream.Flush();
// this requires a memory copy
var […]
[Original post on hachyderm.io]
```
var stream = new MemoryStream();
stream.Write([1, 2, 3]); // some data is written to the memory stream
stream.Flush();
// this requires a memory copy
var […]
[Original post on hachyderm.io]
【最後に zlib圧縮】
このようなバイト列 (MemoryStream) を、ファイルに保存するときは zlib で圧縮してから Base64 で文字化しています。
すると、データサイズはおよそ
《 1機 10分で 100 KB 》
となりました。
ブルーインパルスのフル再現を想定して 6機 45分 としても、たったの 2.7 MB です。
【最後に zlib圧縮】
このようなバイト列 (MemoryStream) を、ファイルに保存するときは zlib で圧縮してから Base64 で文字化しています。
すると、データサイズはおよそ
《 1機 10分で 100 KB 》
となりました。
ブルーインパルスのフル再現を想定して 6機 45分 としても、たったの 2.7 MB です。
In my opinion this is a hack. I'd rather have a solution that works with properly scoping the variables.
In my opinion this is a hack. I'd rather have a solution that works with properly scoping the variables.
い つ も の
(解説: C# でプログラミングをする時に「ここはまだ実装してないよ!!だからここのコードを実際に実行したらエラー出すね」というのを示すのが NotImplementedException です)
い つ も の
(解説: C# でプログラミングをする時に「ここはまだ実装してないよ!!だからここのコードを実際に実行したらエラー出すね」というのを示すのが NotImplementedException です)
MemoryStream src = new MemoryStream(content);
GZipStream zip = new GZipStream(src, CompressionMode.Decompress);
MemoryStream result = new MemoryStream(2 * content.Length);
zip.CopyTo(result);
zip.Close();
src.Close();
MemoryStream src = new MemoryStream(content);
GZipStream zip = new GZipStream(src, CompressionMode.Decompress);
MemoryStream result = new MemoryStream(2 * content.Length);
zip.CopyTo(result);
zip.Close();
src.Close();
GZipStream zipStream = new GZipStream(resultStream, CompressionMode.Compress);
and
GZipStream zipStream = new GZipStream(sourceStream, CompressionMode.Decompress);
streams are MemoryStream in both cases.
GZipStream zipStream = new GZipStream(resultStream, CompressionMode.Compress);
and
GZipStream zipStream = new GZipStream(sourceStream, CompressionMode.Decompress);
streams are MemoryStream in both cases.
MemoryStream -> WriteableBitmap でなんとかなった
MemoryStream -> WriteableBitmap でなんとかなった
#csharp #dotnet
#csharp #dotnet
Posted by Ron E on Aug 26WatsonWebserver contains an HTTP/1 request body size-limit bypass when
processing requests using Transfer-Encoding: chunked.
The framework's configured Settings.IO.Max…
#hackernews #news
Posted by Ron E on Aug 26WatsonWebserver contains an HTTP/1 request body size-limit bypass when
processing requests using Transfer-Encoding: chunked.
The framework's configured Settings.IO.Max…
#hackernews #news
www.nuget.org/packages/KZD...
#dotnet #csharp #perf #opensource
www.nuget.org/packages/KZD...
#dotnet #csharp #perf #opensource
See side-by-side comparisons with MemoryStream and RecyclableMemoryStream.
kzdev-net.github.io/kzdev.perfut...
See side-by-side comparisons with MemoryStream and RecyclableMemoryStream.
kzdev-net.github.io/kzdev.perfut...
A fast, secure drop-in for .NET's MemoryStream
✅ Outperforms RecyclableMemoryStream
✅ Clears unused memory
✅ Native memory support
📦 NuGet: www.nuget.org/packages/KZD...
#dotnet #csharp #performance #NuGet #GC
A fast, secure drop-in for .NET's MemoryStream
✅ Outperforms RecyclableMemoryStream
✅ Clears unused memory
✅ Native memory support
📦 NuGet: www.nuget.org/packages/KZD...
#dotnet #csharp #performance #NuGet #GC
🏷️ #devdigest #dotnet #net
https://devdigest.today/goto/5242
🏷️ #devdigest #dotnet #net
https://devdigest.today/goto/5242