[Pharo-project] I am serializing correctly with SIXX?

Mariano Martinez Peck marianopeck at gmail.com
Thu Jun 2 08:31:43 EDT 2011


Thanks Norbert. Now I could successfully run benchmarks for SIXX and compare
with Fuel. But that's not really fare because we are comparing a text based
serializer against a binary one.

Mariano

On Thu, Jun 2, 2011 at 12:14 PM, Norbert Hartl <norbert at hartl.name> wrote:

>
> Am 02.06.2011 um 11:42 schrieb Mariano Martinez Peck:
>
> >> serialize: anObject on: aStream
>     | sws |
>     sws := SixxWriteStream on: aStream.
>     sws nextPut: anObject.
>     sws close.
>
> serialize: anObject on: aStream
>    anObject sixxOn: aStream
>
>
> >> materializeFrom: aStream
>     | srs objects |
>     srs := SixxReadStream on: aStream.
>     objects := srs contents.
>     srs close.
>     ^ objects
>
>
> materializeFrom: aStream
> ^ Object readSixxFrom: aStream
>
> Norbert
>
>
>
> Is that correct or I am doing it wrong?  All I want to do is to serialize a
> graph into a stream.
>
> The stream I am using is or this:
>
> (FileDirectory default forceNewFileNamed:  'Bench')
>
> or
>
> (RWBinaryOrTextStream on: '')
>
>
> I am not sure if I should be doing a #nextPut: or a #nextPutAll:. I mean,
> sometimes anObject is a collection and sometimes it is not. So, which one
> should I use?
>
> Thanks
>
> Mariano
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20110602/33b5e0f8/attachment-0001.html>


More information about the Pharo-dev mailing list