in reply to Streaming Compression
For a compression library I would use Compress::ZLib. If you want to stream you will need to use deflateInit/deflate/flush for compression and inflateInit/inflate for decompression. (Read the documentation for details - I don't have time at the moment to hack up some pseudocode.)
One warning. You need to think through what your buffering strategy is. Compression and encryption work best when they get as much data as they want to do a chunk of work. Streaming data often cares about latency. The two goals conflict - if a message halfway fills a compression buffer and you let compression work like it wants to, the message won't get sent for an indefinite amount of time.
Two articles that may help you understand the warning. See Suffering From Buffering and then It's the Latency, Stupid. If you read those and don't follow my point, just ask.
UPDATE
A random tip which is not quite worth a new post. If you are on Windows, you will need to look at binmode.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 1: Streaming Compression
by satanklawz (Beadle) on Dec 18, 2001 at 03:28 UTC | |
by tilly (Archbishop) on Dec 18, 2001 at 03:37 UTC | |
by satanklawz (Beadle) on Dec 21, 2001 at 00:23 UTC | |
by FoxtrotUniform (Prior) on Dec 18, 2001 at 04:34 UTC |