Subject Re: [Firebird-Architect] Re: Record Encoding
Author Jim Starkey
Jason Dodson wrote:

>Why not simply transmit the BLOB without compression, and have the
>server compress it? Perhaps in a different thread/process?
Two good reasons. First, compression before transmission means few
bytes are transmitted. Second, it moves a relatively expensive
operation from the server, a shared resource, to the client.

>As for compression, I tend the bzip2 lib to be easy to use and quite
>wonderful. I think you see over time, most open projects come to this
The numbers I've found suggest that the bzip algorithm is twice as
efficient but 6 times more expensive to encode and 40% more expensive to
decode than gzip/zip. That's an expected tradeoff: increased data
analysis for increased density. I chose run length encoding over more
sophisticated schemes in 1984 because the alternatives were too
computationally expensive for the machines of that day. There is a
lesson there, though: we need to make provision for negotiating the
compression algorithm between client and server to allow phase-in a more
efficient algorithms as platforms change. The client needs to be able
to call the algorithm from within a palatte presented by the server.