Archive-SCS

 view release on metacpan or  search on metacpan

lib/Archive/SCS/CityHash.xs  view on Meta::CPAN

SV *
cityhash64_(sv)
    SV * sv
  PROTOTYPE: $
  CODE:
    STRLEN len;
    const char *buf = SvPVbyte(sv, len);
    uint64 cityhash_int = CityHash64(buf, len);
    U64 cityhash = to_network_byteorder(cityhash_int);
    RETVAL = newSVpvn((const char * const) &cityhash, U64SIZE);
  OUTPUT:
    RETVAL



( run in 0.295 second using v1.01-cache-2.11-cpan-4e96b696675 )