On May 14, 1:28*pm, woodbria...@gmail.com wrote:
> Shalom
>
> Version 1.9 of the C++MiddlewareWriter is now available. *This
> version
> adds support forBoost Arrayand it also has a command line interface
> that allows users to bypass the web interface. *In other words, it
> makes
> it easy to integrate the C++MiddlewareWriter into your build
> process.http://webEbenezer.net/build_integration.html
>
One thing about the command line interface that is kind
of interesting is that is uses bzip2 to compress files
before transmitting them. I came across a kind of
unusual situation when working on this part of the
program. The program first calculates the number of
bytes in a message. There's no way to figure out
how many bytes a file will be when its compressed
without actually compressing it. But I wasn't ready to
marshall the compressed data at that point -- I'm
still counting how many bytes are in the message.
So I decided to store the compressed data in a deque
for later use. This means the CalculateMarshallingSize
function has a side effect that is later used by the Send
function. One alternative would be to do the compression
twice, but that didn't seem like the right answer so I
took the aforementioned approach. The code is mostly
here --
http://webEbenezer.net/misc/File.cc.
--
Brian Wood
Ebenezer Enterprises
http://www.webEbenezer.net