binary streams, how to

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

binary streams, how to

Petr Fischer-3
Hi,

which methods shall I use for binary (fast) reads/writes to file
(stream)?
I need to write Boolean (1byte), Integers (4 or 8 bytes), Floats (?) and
Strings into big files, but standard way via storeOn: (text
representation) is inefficient for me.

Thanks, pf


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: binary streams, how to

Klaus D. Witzel
Hi Petr,

on Mon, 23 Oct 2006 00:02:28 +0200, you wrote:
> Hi,
>
> which methods shall I use for binary (fast) reads/writes to file
> (stream)?
> I need to write Boolean (1byte), Integers (4 or 8 bytes), Floats (?) and
> Strings into big files, but standard way via storeOn: (text
> representation) is inefficient for me.

You may want to look into the #'data get/put' messages category of  
PositionableStream, implementors of #int32: then alt-B

/Klaus

> Thanks, pf


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re: binary streams, how to

Petr Fischer-3
Thanks.

Klaus D. Witzel píše v Po 23. 10. 2006 v 07:15 +0200:

> Hi Petr,
>
> on Mon, 23 Oct 2006 00:02:28 +0200, you wrote:
> > Hi,
> >
> > which methods shall I use for binary (fast) reads/writes to file
> > (stream)?
> > I need to write Boolean (1byte), Integers (4 or 8 bytes), Floats (?) and
> > Strings into big files, but standard way via storeOn: (text
> > representation) is inefficient for me.
>
> You may want to look into the #'data get/put' messages category of  
> PositionableStream, implementors of #int32: then alt-B
>
> /Klaus
>
> > Thanks, pf
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners