{ my @nybbles; sub c_out { push @nybbles, 0 if ! @_; @_= ( @nybbles, map { $_&0xf } map { $_, $_>>4, $_>>8 } @_ ); print OUT pack "C", shift|(shift()<<4) while 1 < @_; @nybbles= @_; } } { my @n; sub c_in { do { return shift(@n) | shift(@n)<<4 | shift(@n)<<8 if 2 < @n; push @n, map { $_&0xf, $_>>4 } unpack "C*", ; } while( 1 < @n ); return; } }