Skip to content

Instantly share code, notes, and snippets.

@autarch
Created July 10, 2013 15:34
Show Gist options
  • Save autarch/5967326 to your computer and use it in GitHub Desktop.
Save autarch/5967326 to your computer and use it in GitHub Desktop.
my $int = uint128(0);
return $int if $size == 0;
my @unpacked = unpack( 'NNNN', $self->_zero_pad_left( $buffer, 16 ) );
for my $piece (@unpacked) {
$int <<= 32;
$int |= $piece;
}
return $int;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment