Hi Antonio, Thanks for the feedback, you've answer most of my questions.
My problem with LZ_decompress_finish is that the 2 functions above work on streams, so they are not supposed to finish anything, since they might just get called afterwards on the next chunk. Note that the same decoder may be used on every call. Question: is it OK to re-use a decoder? Or is it recommended to re-create a decoder for every chunk (de)compression? > If you don't call it, a truncated member may not be detected. Can you explain why? If I read/write all the written data, is it possible that something would be missing? > If you want it simple, you may even alternate write/read calls in a loop > without checking LZ_(de)compress_write_size. See this patch to bbexample.c: Thanks for this suggestion. Indeed, I was wondering what's the need for checking the LZ_(de)compress_write_size. Don't we have enough information by checking for the number of written bytes or for errors? -- Pierre Neidhardt https://ambrevar.xyz/
signature.asc
Description: PGP signature
_______________________________________________ Lzip-bug mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lzip-bug
