Convert-DUDE
view release on metacpan or search on metacpan
lib/Convert/DUDE.pm view on Meta::CPAN
shift @quartets while (@quartets && $quartets[0] eq '0000');
my @fb_quartets = ((map { '1' . $_ } @quartets[0..$#quartets - 1]),
'0' . $quartets[-1]);
$output .= $bits2char{$_} for (@fb_quartets);
$prev = $n;
}
return $output;
}
sub to_dude($) {
my $domain = shift;
return __PACKAGE__->prefix . dude_encode($domain);
}
=begin algorithm
let prev = 0x60
while the input string is not exhausted do begin
if the next character is hyphen-minus
then consume it and output 0x2D
( run in 0.830 second using v1.01-cache-2.11-cpan-65fba6d93b7 )