public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] No zlib crc32 support?
@ 2003-12-09 21:08 Steve Strublic
  2003-12-09 21:27 ` Gary Thomas
  2003-12-10  8:39 ` Andrew Lunn
  0 siblings, 2 replies; 5+ messages in thread
From: Steve Strublic @ 2003-12-09 21:08 UTC (permalink / raw)
  To: ecos-discuss


Would there be any objection to including it (meaning the 'official' zlib version of crc32) in the
zlib package anyhow?  In my case (and I would think many others), it makes what I'm doing completely
portable between Linux and eCos without having to ifdef for eCos.

Steve

--------
"Space is almost infinite.  In fact, we think it is infinite."  -- Dan Quayle



                                                                                                                                                                
                      gary@mlbassoc.com                                                                                                                         
                      Sent by:                          To:       SStrublic@hypercom.com                                                                        
                      ecos-discuss-owner@sources        cc:       ecos-discuss@sources.redhat.com                                                               
                      .redhat.com                       Subject:  Re: [ECOS] No zlib crc32 support?                                                             
                                                                                                                                                                
                                                                                                                                                                
                      12/09/03 01:45 PM                                                                                                                         
                                                                                                                                                                
                                                                                                                                                                




On Tue, 2003-12-09 at 13:25, Steve Strublic wrote:
> Hello all,
>
> I'm working on a little project to perform validation of a data set, and planned to use zlib's
crc32
> call to validate the data.  Much to my surprise, I found that eCos does not support the crc32
> call--apparently, on purpose.
>
> Would someone be so kind as to explain why this is the case?  I know I can use Adler32 as it's
> supported, but I'm just wondering why crc32 isn't supported.

Actually, I think it's just not duplicated in the ZLIB package.
CRC32 is available in the CRC package.

--
Gary Thomas <gary@mlbassoc.com>
MLB Associates


--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss






-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] No zlib crc32 support?
  2003-12-09 21:08 [ECOS] No zlib crc32 support? Steve Strublic
@ 2003-12-09 21:27 ` Gary Thomas
  2003-12-10  8:39 ` Andrew Lunn
  1 sibling, 0 replies; 5+ messages in thread
From: Gary Thomas @ 2003-12-09 21:27 UTC (permalink / raw)
  To: Steve Strublic; +Cc: ecos-discuss

On Tue, 2003-12-09 at 14:04, Steve Strublic wrote:
> Would there be any objection to including it (meaning the 'official' zlib version of crc32) in the
> zlib package anyhow?  In my case (and I would think many others), it makes what I'm doing completely
> portable between Linux and eCos without having to ifdef for eCos.
> 

Are you wanting to call crc32() yourself?  or use some of the ZLIB 
functions (that aren't normally used by eCos) that require it?

If you're doing it, all you really need is:
  #define crc32 cyg_crc32_accumulate

> Steve
> 
> --------
> "Space is almost infinite.  In fact, we think it is infinite."  -- Dan Quayle
> 
> 
> 
>                                                                                                                                                                 
>                       gary@mlbassoc.com                                                                                                                         
>                       Sent by:                          To:       SStrublic@hypercom.com                                                                        
>                       ecos-discuss-owner@sources        cc:       ecos-discuss@sources.redhat.com                                                               
>                       .redhat.com                       Subject:  Re: [ECOS] No zlib crc32 support?                                                             
>                                                                                                                                                                 
>                                                                                                                                                                 
>                       12/09/03 01:45 PM                                                                                                                         
>                                                                                                                                                                 
>                                                                                                                                                                 
> 
> 
> 
> 
> On Tue, 2003-12-09 at 13:25, Steve Strublic wrote:
> > Hello all,
> >
> > I'm working on a little project to perform validation of a data set, and planned to use zlib's
> crc32
> > call to validate the data.  Much to my surprise, I found that eCos does not support the crc32
> > call--apparently, on purpose.
> >
> > Would someone be so kind as to explain why this is the case?  I know I can use Adler32 as it's
> > supported, but I'm just wondering why crc32 isn't supported.
> 
> Actually, I think it's just not duplicated in the ZLIB package.
> CRC32 is available in the CRC package.
> 
> --
> Gary Thomas <gary@mlbassoc.com>
> MLB Associates
> 
> 
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
> 
> 
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] No zlib crc32 support?
  2003-12-09 21:08 [ECOS] No zlib crc32 support? Steve Strublic
  2003-12-09 21:27 ` Gary Thomas
@ 2003-12-10  8:39 ` Andrew Lunn
  2003-12-10 11:14   ` [ECOS] " Daniel Néri
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2003-12-10  8:39 UTC (permalink / raw)
  To: Steve Strublic; +Cc: ecos-discuss

On Tue, Dec 09, 2003 at 02:04:05PM -0700, Steve Strublic wrote:
 
> Would there be any objection to including it (meaning the 'official'
> zlib version of crc32) in the zlib package anyhow?  In my case (and
> I would think many others), it makes what I'm doing completely
> portable between Linux and eCos without having to ifdef for eCos.

I took this and several other crc32 implementations out from various
bits of eCos simply because an image would end up with many
implementations in the same image. This is particularly bad because
each one had its own table of coefficients which is quite large and
totally redundant. eCos wants to be small so this was an obvious
optimization.

There was also the name space pollution problem. One of the crc32()
functions actually implemented a different variation on the crc32()
algorithm which was incompatible with all the other crc32 algorithms.
Plus some "user" code may want to yet again implement its own crc32
algorithm. So sorting this mess out i decide it was better to stick to
the standard cyg_ prefix convention.

I would be reluctant to put back the crc32 function in zlib. Its a
step back towards chaos, bigger images and potential naming problems.

Either do as Gary suggested, or call cyg_crc32(). 

       Andrew

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ECOS] Re: No zlib crc32 support?
  2003-12-10  8:39 ` Andrew Lunn
@ 2003-12-10 11:14   ` Daniel Néri
  2003-12-10 11:35     ` Andrew Lunn
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Néri @ 2003-12-10 11:14 UTC (permalink / raw)
  To: ecos-discuss

Andrew Lunn <andrew@lunn.ch> writes:

> I would be reluctant to put back the crc32 function in zlib. Its a
> step back towards chaos, bigger images and potential naming
> problems.

The recently released zlib 1.2.1 (not yet in eCos) has a new CRC32
implementation which is claimed to be about 50% faster than the old
one.

This would possibly be a good argument to at least make it
configurable which one to use. Or maybe even replace the eCos CRC32
implementation with the new one from zlib...

Regards,
--Daniel


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] Re: No zlib crc32 support?
  2003-12-10 11:14   ` [ECOS] " Daniel Néri
@ 2003-12-10 11:35     ` Andrew Lunn
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2003-12-10 11:35 UTC (permalink / raw)
  To: Daniel N?ri; +Cc: ecos-discuss

On Wed, Dec 10, 2003 at 12:14:44PM +0100, Daniel N?ri wrote:
> Andrew Lunn <andrew@lunn.ch> writes:
> 
> > I would be reluctant to put back the crc32 function in zlib. Its a
> > step back towards chaos, bigger images and potential naming
> > problems.
> 
> The recently released zlib 1.2.1 (not yet in eCos) has a new CRC32
> implementation which is claimed to be about 50% faster than the old
> one.
> 
> This would possibly be a good argument to at least make it
> configurable which one to use. Or maybe even replace the eCos CRC32
> implementation with the new one from zlib...

I would probably go for replacing on the in the CRC package, but it
would depend on how they have made it faster.

Submit a patch and i will take a look.

       Andrew

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-12-10 11:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-09 21:08 [ECOS] No zlib crc32 support? Steve Strublic
2003-12-09 21:27 ` Gary Thomas
2003-12-10  8:39 ` Andrew Lunn
2003-12-10 11:14   ` [ECOS] " Daniel Néri
2003-12-10 11:35     ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).