I’m using the
rust-lzma crate. It seems to possible, that its writer does not need to consume any of the input but needs to write data. Thus in the current implementation it returns zero bytes written. Which means
write_all will fail with an error
(I’m not sure if this is an error in the implementation of the crate, though)
Generally, the implementation of
write_all does not supports the case, where a writer consumes none of the input stream but needs to write some internally buffered data. So it seems to me, that using the number of bytes written as an error indicator is rather limiting. Or am I missing something?