[Glass] How to properly write bytes objects into binary streams?

Martin McClure via Glass glass at lists.gemtalksystems.com
Wed Sep 3 09:12:24 PDT 2014


On 09/03/2014 06:58 AM, Mariano Martinez Peck wrote:
>

[...]

>
> But again, I want to go step by step.
>
>     If the answer to either of these is "yes," then things get a bit
>     more complicated.
>
>
> Even if they would be desired later, right now, I am fine with a "No"
> answer.
>

OK, for the limited gs-to-gs case, same endianness...

Since in GemStone #replaceFrom:to:with: expects to be copying from a 
collection, not (for instance) a LargeInteger, the most generic way to 
copy the bytes of a byte object is probably to write a loop that uses 
#_basicSize and #_basicAt: to access the bytes.

Regards,

-Martin



More information about the Glass mailing list