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
I don't want to do a method that takes or return a Bytes<N> because the whole point of the streaming API is for file that are too large and for which we don't want to have large stack allocations.
What I think we may want to have a function that reads a file and insert it to a &mut Vec, but I was not sure which type should be used?
In opcard and PIV we have a Reply wrapper type around Bytes which are themselves a wrapper around heapless::Vec<u8,N>.
Maybe we could have something like read_to_end(path, location, buffer: &mut impl Write) but I'm not sure which Write trait we should use (std::io::Write is not available in core). Maybe we should come up with our own?
The text was updated successfully, but these errors were encountered:
Also there are many cases where we want to have the length of the file before we begin writing stuff to the output. This is for example the case when dealing with TLV data.
A
read_to_end
function instreaming::utils
.I don't want to do a method that takes or return a
Bytes<N>
because the whole point of the streaming API is for file that are too large and for which we don't want to have large stack allocations.What I think we may want to have a function that reads a file and insert it to a
&mut Vec
, but I was not sure which type should be used?In opcard and PIV we have a
Reply
wrapper type aroundBytes
which are themselves a wrapper aroundheapless::Vec<u8,N>
.Maybe we could have something like
read_to_end(path, location, buffer: &mut impl Write)
but I'm not sure which Write trait we should use (std::io::Write
is not available in core). Maybe we should come up with our own?The text was updated successfully, but these errors were encountered: