* Anthony Lalande <[EMAIL PROTECTED]>  on Fri, 12 Jan 2001
| I'm wondering if you would get better compression by treating the whole
| stream as 1 block, and then compressing that, or compression in many smaller
| blocks. I guess it all depends on the compression used.

All data compression programs work roughly like this: a block of data is
put into a buffer.  The algorithm scans the buffer for redundant data and
patterns and builds hash tables in additional buffers.  Scanning often
requires several passes over the buffer.  Many compression utilities use
several different algorithms to obtain maximum compression, and each
algorithm requires one or more hash buffers of its own.  And, of course,
each pass requires processing power.  A final hash for the block is chosen
and written out.

Increasing the block size increases the quantity of redundant data and
patterns in the stream, which usually means greater compression ratios.
Bigger blocks require more memory for the buffers, and have more complex
patterns which means more processing power/time is required.

32-64K blocks is the norm for high-level compression these days.  That is
what bzip2 uses, and boy is it slow even on a fast Pentium-III.  One minute
of linear PCM is ~8.75MB.  You would need a supercomputer the size of a
refrigerator to utilize a block size that large.
-- 
Rat <[EMAIL PROTECTED]>    \ Happy Fun Ball contains a liquid core,
Minion of Nathan - Nathan says Hi! \ which, if exposed due to rupture, should
PGP Key: at a key server near you!  \ not be touched, inhaled, or looked at.

-----------------------------------------------------------------
To stop getting this list send a message containing just the word
"unsubscribe" to [EMAIL PROTECTED]

Reply via email to