From: Harm Olthof on
Hello group,
In Tcl 8.6, using [zlib compress $data 9], can I assume that the
blocksize zlib uses is always larger than the size of the data? If
not: how can I get or set the block size? (compression window), zlib
uses.

Currently, the only way to get an impression of the block size that I
can think of is to investigate if
[string length [zlib compress [string repeat $somestring $n]]] stays
more or less constant with growing $n.

I would appreciate suggestions...

Harm
From: Donal K. Fellows on
On 8 May, 16:46, Harm Olthof <jababa...(a)hotmail.com> wrote:
> In Tcl 8.6, using [zlib compress $data 9], can I assume that the
> blocksize zlib uses is always larger than the size of the data? If
> not: how can I get or set the block size? (compression window), zlib
> uses.

It always uses (the maximum of 2**)15. That's one of the ways in which
the Tcl interface simplifies from the underlying zlib interface.

Donal.
From: Harm Olthof on
On May 8, 7:09 pm, "Donal K. Fellows"
<donal.k.fell...(a)manchester.ac.uk> wrote:
> On 8 May, 16:46, Harm Olthof <jababa...(a)hotmail.com> wrote:
>
> > In Tcl 8.6, using [zlib compress $data 9], can I assume that the
> > blocksize zlib uses is always larger than the size of the data? If
> > not: how can I get or set the block size? (compression window), zlib
> > uses.
>
> It always uses (the maximum of 2**)15. That's one of the ways in which
> the Tcl interface simplifies from the underlying zlib interface.
>
> Donal.

Thanks! That's quite a broad range, (assuming it are bytes).
Harm