I'm pretty sure that zip has some fix overhead which doesn't pay off with just 189 bytes input.
> my @code = map glob('{A,B,C}'x $_), 5, 2, 1;
I haven't run your code but it looks like you are mapping 9 possible chunks to a character needing a byte.
Looks like you are wasting space. Already a naive 4 bit per chunk approach, i.e 1 byte for two chunks would double your efficiency.° (Needless to say, Huffman even more) (Update: sorry I totally misunderstood how your glob works)
FWIW I doubt the input sample is realistic. Looks handmade by copying and altering the first line, hence the high redundancy. :)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^2: How to efficently pack a string of 63 characters
by LanX
in thread How to efficently pack a string of 63 characters
by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |