RE: [PATCH RFC] 1/2 central workspace for zlib

Joakim Tjernlund
2003-06-02T13:03:14Z

> On Sat, 31 May 2003 17:44:06 +0200, Joakim Tjernlund wrote:
> > > jffs2: inflate & deflate, initialized once, 450k
> >
> > 450KB looks like a lot considering JFFS2 will never compress more than a PAGE at a time.
> > I think the actual workspace needed is much less, but none has figured out how to calculate
> > the real workspace needed for a fixed buffer size, right?
>
> When talking about zlib, "noone has done it yet" is almost always
> right. :)
>
> The kernel workspace #defines MAX_MEM_LEVEL to 9, while the zlib
> default is 8. That translates to 256k instead of 128k is is likely
> pointless for JFFS2 style of compression. Another 50k come from the
> seperate workspaces for inflate and deflate. So JFFS2 should be able
> to work with 280k, roughly.

hmm, won't the mem level in zlib_deflateInit() influence the needed workspace? I always
figured that the memory reuirements listed in zconf.h was worst case.
Since JFFS2 uses mem level 3, is it not possible that JFFS2 needs less memory?

>
> Have you ever seen/done benchmarks that test zlib compression
> efficiency?
no, sorry.

Jocke
>
> Jörn