lzip-bug
[Top][All Lists]
Advanced

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

Re: [Lzip-bug] LZ_decompress_finished before LZ_decompress_read


From: Antonio Diaz Diaz
Subject: Re: [Lzip-bug] LZ_decompress_finished before LZ_decompress_read
Date: Thu, 03 Dec 2009 18:40:11 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

Hello Jacob,

Jacob Rief wrote:
currently I am adding LZMA support to an existing streaming library
using your lzlib implementation.

Great!


this is OK, but LZ_decompress_finished only returns 1 after
LZ_decompress_read has returned with -1, setting LZ_decompress_errno
to LZ_header_error.

Are you feeding any trailing garbage to LZ_decompress_write? Lzlib can decompress concatenated lzip members (compressed data sets). So, if it finds more data after the end of a member, it will try to decode a new header.


This implementation works fine, but from the point of view of an API
client, I would expect for cleanness and symmetry reasons that
LZ_decompress_finished returns 1 BEFORE LZ_decompress_read
returns an error.

This is the intended behaviour of lzlib in absence of trailing garbage.


Best regards,
Antonio.




reply via email to

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