[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: qdatastream with checksum
From:       Simon Hausmann <hausmann () kde ! org>
Date:       2001-05-24 7:33:50
[Download RAW message or body]

On Wed, May 23, 2001 at 02:38:53PM +0100, Richard Moore wrote:
> 
> 
> Simon Hausmann wrote:
> > 
> > What I'm thinking of in detail is a KCheckSumByteArray (TODO: find better
> > name :) , which inherits from QByteArray and adds a checksum property
> > (like we could use a simple CRC32) when being marshalled into a QDataStream
> > (and does so likewise when reading from a QDataStream, including a check
> > of the checksum and setting a isValid() boolean property appropriately) .
> 
> Wouldn't it be nicer to have a QDataStream subclass eg. KCRCDataStream?

That was my first thought, too, but then: Why subclass QDataStream (which is
just responsible for the actual marshalling) when we actually want to operate
on the data source (for the checksum) ?
 
> > 
> > (I volunteer to implement this, just in case)
> 
> You should be able to pull the CRC32 code from ZLib.
 
Good idea. (I think we require zlib anyway?)

Bye,
 Simon

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic