Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262769AbVDAP0I (ORCPT ); Fri, 1 Apr 2005 10:26:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262759AbVDAPYm (ORCPT ); Fri, 1 Apr 2005 10:24:42 -0500 Received: from arnor.apana.org.au ([203.14.152.115]:16132 "EHLO arnor.apana.org.au") by vger.kernel.org with ESMTP id S262771AbVDAPYO (ORCPT ); Fri, 1 Apr 2005 10:24:14 -0500 Date: Sat, 2 Apr 2005 01:23:25 +1000 To: "Artem B. Bityuckiy" Cc: dwmw2@infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Subject: Re: [RFC] CryptoAPI & Compression Message-ID: <20050401152325.GB4150@gondor.apana.org.au> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040907i From: Herbert Xu Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1116 Lines: 24 On Fri, Apr 01, 2005 at 03:36:23PM +0100, Artem B. Bityuckiy wrote: > > In our code we do zlib_deflate(stream, Z_SYNC_FLUSH), so we always flush > the output. So the final zlib_deflate(stream, Z_FINISH) requires 1 byte > for the EOB marker and 4 bytes for adler32 (5 bytes total). Thats all. If > we compress a huge buffer, then we still need to output those 5 bytes as > well. I.e, the overhead of each block *is not accumulated* ! I even need > to make the reserved space less then 12 bytes! I thought stored blocks (incompressible blocks) were limited to 64K in size, no? Please double check zlib_deflate/deflate.c and zlib_deflate/deftree.c. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/