Esteban, Could you explain line 8 ? why did you use a Base64MimeConverter? thanks. line 8: stream nextPutAll: 'ZnBase64Encoder '; nextPutAll: [ (Base64MimeConverter mimeEncode: ba readStream multiLine: false) ] bench printString; cr. On Thu, Oct 29, 2015 at 3:43 PM, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
2015-10-29 15:21 GMT-03:00 Peter Uhnák <i.uhnak@gmail.com>:
Option A) The printString of ByteArray, it is #[23 12 253 ...]
Option B) A Base64 encoded version of the ByteArray
I like this one, because it is not Pharo-specific format. ByteArray is not pharo-specific, but the syntax is --- I can copy paste base64 from/to outside world. Plus base64 has better tool support in the wild.
I also prefer base64 even over native binary storage.
I ran a small comparison[1] of speed and size and these were my results.
ByteArray size: 19448860
Speed: Base64MimeConverter: ''0.592 per second'' #hex: ''0.666 per second'' #asString: ''6.898 per second'' ZnBase64Encoder ''0.459 per second''
Size: Base64MimeConverter: 26291980 #hex: 38897720 #asString: 19448860 ZnBase64Encoder 25931816
Esteban A. Maringolo
-- Bernardo E.C. Sent from a cheap desktop computer in South America.