[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#35880] [PATCH 1/7] lzlib: Add 'make-lzip-input-port/compressed'.
From: |
Pierre Neidhardt |
Subject: |
[bug#35880] [PATCH 1/7] lzlib: Add 'make-lzip-input-port/compressed'. |
Date: |
Mon, 27 May 2019 18:24:08 +0200 |
Ludovic Courtès <address@hidden> writes:
> I noticed that ‘lz-compress-read’ is documented to return a “strictly
> positive integer”, so I’m changing it to this:
The docstring (that I wrote) says "non-negative positive integer."
"positive" is a typo (sorry about that), it should read "non-negative
integer" since the return value can be zero.
In general, lzlib's "reads" and "writes" don't give any guarantee about
the size of bytes that are actually processed. You need to loop over
the calls until some condition is met, see the "finish(ed)" functions.
Here in particular, it's not clear that lz-compress-read is going to read
all the bytes in the encoder buffer. Maybe that's OK for this
particular functions if we don't expect TARGET-COUNT to be reached. See
http://www.nongnu.org/lzip/manual/lzlib_manual.html#Buffering
That said, if the encoder buffer is not empty, I think lz-compress-read
should always return something >0.
Yup, lzlib is very low-level! :p
--
Pierre Neidhardt
https://ambrevar.xyz/
signature.asc
Description: PGP signature
- [bug#35880] [PATCH 7/7] lzlib: 'lzread!' never returns more than it was asked for., (continued)
- [bug#35880] [PATCH 7/7] lzlib: 'lzread!' never returns more than it was asked for., Pierre Neidhardt, 2019/05/25
- [bug#35880] [PATCH 7/7] lzlib: 'lzread!' never returns more than it was asked for., Ludovic Courtès, 2019/05/26
- [bug#35880] [PATCH 7/7] lzlib: 'lzread!' never returns more than it was asked for., Pierre Neidhardt, 2019/05/26
- [bug#35880] [PATCH 7/7] lzlib: 'lzread!' never returns more than it was asked for., Ludovic Courtès, 2019/05/26
- [bug#35880] [PATCH 7/7] lzlib: 'lzread!' never returns more than it was asked for., Pierre Neidhardt, 2019/05/27
- [bug#35880] [PATCH 7/7] lzlib: 'lzread!' never returns more than it was asked for., Ludovic Courtès, 2019/05/27
[bug#35880] [PATCH 4/7] publish: Add support for lzip., Ludovic Courtès, 2019/05/24
[bug#35880] [PATCH 1/7] lzlib: Add 'make-lzip-input-port/compressed'., Pierre Neidhardt, 2019/05/25
- [bug#35880] [PATCH 1/7] lzlib: Add 'make-lzip-input-port/compressed'., Ludovic Courtès, 2019/05/26
- [bug#35880] [PATCH 1/7] lzlib: Add 'make-lzip-input-port/compressed'., Ludovic Courtès, 2019/05/27
- [bug#35880] [PATCH 1/7] lzlib: Add 'make-lzip-input-port/compressed'.,
Pierre Neidhardt <=
- bug#35880: [PATCH 1/7] lzlib: Add 'make-lzip-input-port/compressed'., Ludovic Courtès, 2019/05/27
- [bug#35880] [PATCH 1/7] lzlib: Add 'make-lzip-input-port/compressed'., Pierre Neidhardt, 2019/05/27
- [bug#35880] [PATCH 1/7] lzlib: Add 'make-lzip-input-port/compressed'., Ludovic Courtès, 2019/05/28
- [bug#35880] [PATCH 1/7] lzlib: Add 'make-lzip-input-port/compressed'., Pierre Neidhardt, 2019/05/28
- [bug#35880] [PATCH 1/7] lzlib: Add 'make-lzip-input-port/compressed'., Ludovic Courtès, 2019/05/28
- [bug#35880] [PATCH 1/7] lzlib: Add 'make-lzip-input-port/compressed'., Pierre Neidhardt, 2019/05/29
- [bug#35880] [PATCH 1/7] lzlib: Add 'make-lzip-input-port/compressed'., Ludovic Courtès, 2019/05/31