On Thu, Mar 14, 2013 at 11:16 PM, Ben Booth <[email protected]> wrote:
>
> On Mar 14, 2013, at 9:40 AM, Ben Booth <[email protected]> wrote:
>
>> You could probably tweak the above command to use the parallel script to
>> handle the encoding/decoding instead of uuencode/uudecode, since it's
>> required to have parallel installed locally and remotely. I'm not sure how
>> difficult this would be to implement, however.
>
> FYI, MIME::Base64 comes standard with perl, which could probably do the job.
> It's an XS module, so should be reasonably fast.
This is the fastest encode/decode I have been able to find as standard packages:
dd if=/dev/zero bs=1000k count=1k 2>/dev/null |
perl -MMIME::Base64 -0777 -e 'while(read(STDIN,$buf,60*57*12)){print
encode_base64($buf)}' |
perl -MMIME::Base64 -e 'while(read(STDIN,$buf,770*50)){print
decode_base64($buf)}' |
dd bs=1000k >/dev/null
I am surprised it is so slow (encode 200 MB/s, decode 100 MB/s), and
that there are no C/C++ packages that are faster.
/Ole