Adam ♿ on Nostr: Coded an idea I've had for some time, not original but I haven't coded C# for years. ...
Coded an idea I've had for some time, not original but I haven't coded C# for years. Feels very comfortable. Don't use this, it hammers the shit out of servers as C# wants to use 4096 byte reads and I haven't worked out how to make it do anything better.
https://gist.github.com/voltagex/b4c8c113c65b645a8207d3910344ab14Is anyone reading this a C# expert? The only thing I can think of is keeping a bitmap (?) of retrieved segments and blocking on Read() until everything is downloaded - set my segment size to some fraction of the total filesize for faster downloads. I think the underlying mapped file can be used from multiple threads too...
Published at
2025-12-30 10:16:25 UTCEvent JSON
{
"id": "924015cf3c36d9fb14e4c869106852df5df616da713dfbcc8e611ef16bffbd7b",
"pubkey": "fa1b9d03a9d28600a6e3d85152a87f13f0a03171a27b3a49f3f1c89a82783924",
"created_at": 1767089785,
"kind": 1,
"tags": [
[
"proxy",
"https://aus.social/@voltagex/115807996185218793",
"web"
],
[
"proxy",
"https://aus.social/users/voltagex/statuses/115807996185218793",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://aus.social/users/voltagex/statuses/115807996185218793",
"pink.momostr"
],
[
"-"
]
],
"content": "Coded an idea I've had for some time, not original but I haven't coded C# for years. Feels very comfortable. Don't use this, it hammers the shit out of servers as C# wants to use 4096 byte reads and I haven't worked out how to make it do anything better. https://gist.github.com/voltagex/b4c8c113c65b645a8207d3910344ab14\n\nIs anyone reading this a C# expert? The only thing I can think of is keeping a bitmap (?) of retrieved segments and blocking on Read() until everything is downloaded - set my segment size to some fraction of the total filesize for faster downloads. I think the underlying mapped file can be used from multiple threads too...",
"sig": "c1b8081d8d111d721c76f843473dfbd545338092c960ceb33306560fb4a46bf9a0167d79a8dfa7200eb452c374c1a2d1eb86621b90dee7c4c531c4737d6810d1"
}