Open fabricedesre opened 1 year ago
PrivateFile::stream_content() takes an index parameter that is passed to the private forest content when the file content is external. However in the case of inline content, the whole vector is yieled in https://github.com/wnfs-wg/rs-wnfs/blob/6df4a6bf89a71010b7bc15c132512da979ebc438/wnfs/src/private/file.rs#L489
PrivateFile::stream_content()
index
I think we should instead yield data[index..].to_vec()
yield data[index..].to_vec()
Sorry. The index actually refers to the block index, not the byte index. We should fix the docs and provide an abstraction on top that does the conversation between block and byte indices.
PrivateFile::stream_content()
takes anindex
parameter that is passed to the private forest content when the file content is external. However in the case of inline content, the whole vector is yieled in https://github.com/wnfs-wg/rs-wnfs/blob/6df4a6bf89a71010b7bc15c132512da979ebc438/wnfs/src/private/file.rs#L489I think we should instead
yield data[index..].to_vec()