looks OK, what you're doing is basically the same implementation as <https://nim-lang.org/docs/streams.html#write%2CStream%2CT>.
- Writing byte array to FileStream - best approaches? drkameleon
- Writing byte array to FileStream - best approaches? auxym
looks OK, what you're doing is basically the same implementation as <https://nim-lang.org/docs/streams.html#write%2CStream%2CT>.