Join Nostr
2025-12-30 10:16:25 UTC

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/b4c8c113c65b645a8207d3910344ab14

Is 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...