You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current client libraries have archive_get and data_get, but both return Bytes. While this is simple to use and fine for small files, it isn't good for larger files.
Can we have an interface which is similar to how file I/O is usually implemented, e.g. something like a file handler, buffer and offset. This would allow app developers to stream data through their app as it is downloaded.
For sn_httpd, this is a fairly fundamental requirement for larger files. Videos, for example, need to be streamed to allow fast viewing and only ever need to buffer a minute or so ahead. The same is true (to a lesser extent) with audio. Holding all of the data in memory is also inefficient - streaming it to the web client and then discarding it, is ideal.
There may be 'a better way' to do it, but following how Rust works with files may be a good place to start.
The text was updated successfully, but these errors were encountered:
The current client libraries have
archive_get
anddata_get
, but both returnBytes
. While this is simple to use and fine for small files, it isn't good for larger files.Can we have an interface which is similar to how file I/O is usually implemented, e.g. something like a file handler, buffer and offset. This would allow app developers to stream data through their app as it is downloaded.
For sn_httpd, this is a fairly fundamental requirement for larger files. Videos, for example, need to be streamed to allow fast viewing and only ever need to buffer a minute or so ahead. The same is true (to a lesser extent) with audio. Holding all of the data in memory is also inefficient - streaming it to the web client and then discarding it, is ideal.
There may be 'a better way' to do it, but following how Rust works with files may be a good place to start.
The text was updated successfully, but these errors were encountered: