lkml.org 
[lkml]   [2005]   [Apr]   [3]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 03 Apr 2005 13:45:58 +0400
From"Artem B. Bityuckiy" <>
SubjectRe: [RFC] CryptoAPI & Compression

Herbert Xu wrote:
> You can't compress 1M-12bytes into 1M using zlib when the block size
> is 64K.
Here is a cite from RFC-1951 (page 4):

    A compressed data set consists of a series of blocks, corresponding
    to successive blocks of input data.  The block sizes are arbitrary,
    except that non-compressible blocks are limited to 65,535 bytes.

Thus,

1. 64K is only applied to non-compressible data, in which case zlib just 
copies it as it is, adding a 1-byte header and a 1-byte EOB marker.

2. 64K is just the *upper limit*, and blocks may be shorter.

3. If zlib compressed data (i.e., applied LZ77 & Huffman), blocks may 
have arbitrary length.

So, I don't see any reason why I can't.

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
-
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/

\
 
 \ /
  Last update: 2005-04-06 11:31    [from the cache]
©2003-2008