File-FormatIdentification-RandomSampling

 view release on metacpan or  search on metacpan

lib/File/FormatIdentification/RandomSampling.pm  view on Meta::CPAN

}

sub BUILD {
    my $self = shift;
    $self->init_bytegrams();
    return 1;
}



sub update_bytegram {
    my $self = shift;
    my $buffer = shift;
    if (defined $buffer) {
        my $bytegram_ref = $self->{'bytegram'};
        my @bytes = unpack "C*", $buffer;
        my @words = unpack "S*", $buffer;
        #    my @bytes = map{ ord($_)} split //, $buffer;
        if (scalar @bytes > 0) {
            my @onegram = @{$bytegram_ref->[0]};
            my @bigram = @{$bytegram_ref->[1]};

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.489 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )