lzip-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lzip-bug] [lzlib] Help with Scheme bindings (for GNU Guix)


From: Pierre Neidhardt
Subject: Re: [Lzip-bug] [lzlib] Help with Scheme bindings (for GNU Guix)
Date: Wed, 24 Apr 2019 15:09:00 +0200

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/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]