What is the idiom (golf) to pack 7-bit-ASCII to 8-bit-code? 
I have a 7-bit ascii string that needs to be encrypted and then base32-encoded.
To save space I first want to pack the 7-bit ASCII into 8-bit-values with
endpadding and then encrypt it (rc4) and finally base32-encode it. 
And backwards of course.

That should save some space from just encrypt it and base16(hex)-encode it,
shouldn't it?

I've seen a few base64-encoders that pack with pack("u") and then converts
the uuencoded string to base64. Seems a little bit clumsy. 

I have no linebreaks whatsoever to care about.
And I need to base32-encode as case may be trashed.

I'm not looking for free code from you, but a discussion.

/magnus

-- 
#!/usr/bin/perl
$SIG{ALRM}=sub{exit;};alarm 5;$r=<STDIN>;if($r=~m#^GET / HTTP/1#i){alarm 20;
$L="\012\015";print "HTTP/1.1 200 OK$L\Connection: close$L\Content-type: text". 
"/plain$L$L\Just another stupid .sig-webserver. The time is ".localtime().$L;} 

Reply via email to