my $self = shift;
$self->{index_size} = (2**8) * $self->{long_size};
- $self->{bucket_size} = $self->{hash_size} + $self->{long_size};
+ $self->{bucket_size} = $self->{hash_size} + $self->{long_size} * 2;
$self->{bucket_list_size} = $self->{max_buckets} * $self->{bucket_size};
return 1;
my $self = shift;
my ($keys, $idx) = @_;
- my ($key, $subloc) = unpack(
- "a$self->{hash_size} $self->{long_pack}",
+ my ($key, $subloc, $size) = unpack(
+ "a$self->{hash_size} $self->{long_pack} $self->{long_pack}",
substr(
$keys,
($idx * $self->{bucket_size}),
),
);
- return ($key, $subloc);
+ return ($key, $subloc, $size);
}
sub _find_in_buckets {