[Vm-dev] Re: Primitive to crop a ByteArray?

Andreas.Raab andreas.raab at gmx.de
Fri Nov 9 09:58:18 UTC 2012

Igor Stasenko wrote
> right, i also said that to Mariano: usually you split data on smaller
> chunks and compress them.
> And the compressed output you pipe to output stream.
> So, yes, you can't avoid copying things around (because of piping to
> stream)..
> but you cannot squeeze out of it much at this point.
> And since you using stream, you don't really need to crop anything.

Plus, unless the estimate is wildly wrong you can just wrap your result into
a stream; say:

  compressed := ReadWriteStream on: dest from: 1 to: bytesCompressedOrError
+ 4.

  - Andreas

View this message in context: http://forum.world.st/Primitive-to-crop-a-ByteArray-tp4654477p4654591.html
Sent from the Squeak VM mailing list archive at Nabble.com.

More information about the Vm-dev mailing list