http://qs1969.pair.com?node_id=439433


in reply to Re^3: Efficient 7bit compression
in thread Efficient 7bit compression

...a better way to implement ceil...
my $dlen = int((7 + length($_[0]) * 7)/8); substr($_[0], $dlen) = ''; vec ($_[0], $dbit++, 1) = 0 while ($dbit < $dlen * 8); }
This replaces your shrink function from the definition of $dlen on.

Caution: Contents may have been coded under pressure.