Well... compression can always be more effective if the protocol is
already "wasteful".  By "numeric", if you mean that e.g. each byte is
the ASCII representation of a numeric digit, that means that each byte
can only contain 10/256 of the possible byte values - fairly wasteful.
Just by using 2s-compliment binary encoding, you've already
"compressed" your data by as much as 10:1 or better.

- DML

On Wed, 9 Jan 2008 22:54:35 +0800
"Steve Johns" <[EMAIL PROTECTED]> wrote:

> I heard there was a special compression method which could speed up the
> perfomance of the compression if only numeric is in the message. Is that
> true?
> 
> On Jan 8, 2008 11:57 PM, Mark <[EMAIL PROTECTED]> wrote:
> 
> > Not sure.  I think I would run both cases and see which one performs
> > better.  I would guess that putting the compression in the IoHandler would
> > be faster though.
> >
> > On Jan 8, 2008 10:47 AM, Steve Johns <[EMAIL PROTECTED]> wrote:
> >
> > > On Jan 8, 2008 11:08 PM, Mark <[EMAIL PROTECTED]> wrote:
> > >
> > > > The suggested way is to put the ExecutorFilter *after* the codec
> > filter.
> > > >  See http://mina.apache.org/configuring-thread-model.html,
> > specifically
> > > > the
> > > > "Where should I put an ExecutorFilter in an IoFilterChain?" section.
> > > >
> > > > --Mark
> > >
> > >
> > > Thanks. Mark. Actually I did read it before. My question is: whether I
> > > consider to put my 50ms compression into a ExecutorFilter instead of
> > > combined with protocol filter? They are both CPU-bound works.
> > >
> > > On Jan 8, 2008 4:14 AM, Steve Johns <[EMAIL PROTECTED]> wrote:
> > > > Hi
> > > >
> > > > 1) When I consider I need a ExecutorFilter such as compression? It
> > tooks
> > > > 50ms to compression my data.
> > >
> > > > 2) I did the Compression in my codec filter. Should I add an
> > > > ExecutorFilter before codec filter?
> > > > Thanks.
> > > >
> > >
> > >
> > >
> > > --
> > > > --------------------------------
> > > > Talent hits a target no one else can hit; Genius hits a target no one
> > > else
> > > > can see.
> > > >
> > >
> >
> >
> >
> > --
> >  --------------------------------
> > Talent hits a target no one else can hit; Genius hits a target no one else
> > can see.
> >

Reply via email to