Displaying 1 result from an estimated 1 matches for "0aforeach".
2020 Jun 17
1
Deduplication and block size
...gth $buf =3D=3D $bs;=0A if ($buf eq ("\0" x $bs))=
{=0A $zeroes++;=0A }=0A else {=0A my $digest =3D md5_h=
ex ($buf);=0A $h{$digest} =3D 0 unless exists $h{$digest};=0A =
$h{$digest}++;=0A }=0A $blocks++;=0A}=0A=0Amy %hist;=0Amy $lonely =
=3D 0;=0Aforeach (keys %h) {=0A my $n =3D $h{$_};=0A if ($n > 1) {=0A=
$hist{$n} =3D 0 unless exists $hist{$n};=0A $hist{$n}++;=0A =
} else {=0A $lonely++;=0A }=0A}=0A=0Aprintf ("blocks of zeros:=
%s / %s\t%.1f%%\n", $zeroes, $blocks, 100 * $zero...