                                                              -*- org -*-
#+TITLE: Guile-lzlib NEWS – history of user-visible changes
#+STARTUP: content hidestars

Copyright © 2024, 2026 Ludovic Courtès <ludo@gnu.org>

  Copying and distribution of this file, with or without modification,
  are permitted in any medium without royalty provided the copyright
  notice and this notice are preserved.

Please report bugs at https://codeberg.org/guile-compression/guile-lzlib

* Changes in 0.4.0 (compared to 0.3.0)

** Reduce the amount of garbage produced by the lzip ports

The ports returned by =make-lzip-output-port= and =make-lzip-input-port=
used to allocate a fresh bytevector for every chunk of data handed to or
read from lzlib; they now reuse a per-port buffer.

=make-lzip-input-port/compressed= already reused its buffer, but that
buffer is now 64 KiB instead of 8 KiB.

** New =#:buffer-size= argument for the lzip ports

=make-lzip-input-port=, =make-lzip-output-port=,
=make-lzip-input-port/compressed=, =call-with-lzip-input-port= and
=call-with-lzip-output-port= now accept a =#:buffer-size= keyword
argument, the size in bytes of that per-port buffer.  It defaults to the
newly exported =%default-buffer-size=, 64 KiB.  There is no point passing
more than 64 KiB to =make-lzip-input-port=: lzlib never accepts more than
that in a single call.

** Fix =liblz.so= detection by =configure= when using GCC 14+

Previously =./configure= would fail to determine the absolute file name
of =liblz.so= when using recent versions of GCC.

* Changes in 0.3.0 (compared to 0.0.2)

** Fix memory leak

Ports returned by =make-lzip-output-port= and =make-lzip-input-port=
would leak memory if not closed explicitly with =close-port=.

In the case of =make-lzip-output-port=, the port would also leak memory
when closed explicitly but the underlying port would throw an exception
while writing to it.
