Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.10.1/8.10.1) with ESMTP id e67LuQW66825 for ; Fri, 7 Jul 2000 17:56:26 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id RAA13868; Fri, 7 Jul 2000 17:56:12 -0400 (EDT) To: Jan Wieck cc: Peter Eisentraut , PostgreSQL HACKERS Subject: Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios... In-reply-to: <200007071947.VAA26359@hot.jw.home> References: <200007071947.VAA26359@hot.jw.home> Comments: In-reply-to JanWieck@t-online.de (Jan Wieck) message dated "Fri, 07 Jul 2000 21:47:10 +0200" Date: Fri, 07 Jul 2000 17:56:12 -0400 Message-ID: <13864.963006972@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200007/456 JanWieck@t-online.de (Jan Wieck) writes: > eisentrp@csis.gvsu.edu wrote: >> Maybe you just want to use zlib. Let other guys hammer out the details. > We cannot assume that zlib is available everywhere. We can if we include it in our distribution --- which we could; it's pretty small and uses a BSD-style license. I can assure you the zlib guys would be happy with that. And it's certainly as portable as our own code. The real question is, is a custom compressor enough better than zlib for our purposes to make it worth taking any patent risks? We could run zlib at a low compression setting (-z1 to -z3 maybe) to make compression relatively fast, and since that also doesn't generate a custom Huffman tree, the overhead in the compressed data is minor even for short strings. And its memory footprint is certainly no worse than Jan's method... The real question is whether zlib decompression is markedly slower than Jan's code. Certainly Jan's method is a lot simpler and *should* be faster --- but on the other hand, zlib has had a heck of a lot of careful performance tuning put into it over the years. The speed difference might not be as bad as all that. I think it's worth taking a look at the option. regards, tom lane