The city-hash Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The city-hash Reference Manual

This is the city-hash Reference Manual, version 1.8, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Dec 02 09:14:20 2019 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

city-hash

A Common Lisp implementation of Google's CityHash family of hash functions.

For more information

https://github.com/google/cityhash
cityhash-discuss@googlegroups.com

city-hash API

city-hash-32 octets &key (start 0) (end (length octets))

Hashes the contents of OCTETS, a vector of (UNSIGNED-BYTE 8) from index
START to index END and returns the 32-bit hash value as an
(UNSIGNED-BYTE 32).  START defaults to zero, while END defaults to the
length of OCTETS.

city-hash-64 (octets &key (start 0) (end (length octets))

Hashes the contents of OCTETS, a vector of (UNSIGNED-BYTE 8) from index
START to index END and returns the 64-bit hash value as an
(UNSIGNED-BYTE 64).  START defaults to zero, while END defaults to the
length of OCTETS.

city-hash-64-with-seeds (octets seed0 seed1 &key (start 0) (end (length octets))

Hashes the contents of OCTETS, a vector of (UNSIGNED-BYTE 8), from index
START to index END together with seeds SEED0 and SEED1, each of type
(UNSIGNED-BYTE 64), and returns the 64-bit hash value as an
(UNSIGNED-BYTE 64).  START defaults to zero, while END defaults to the
length of OCTETS.

city-hash-64-with-seed (octets seed &key (start 0) (end (length octets))

Hashes the contents of OCTETS, a vector of (UNSIGNED-BYTE 8), from index
START to index END together with SEED of type (UNSIGNED-BYTE 64), and
returns the 64-bit hash value as an (UNSIGNED-BYTE 64).  START defaults to
zero, while END defaults to the length of OCTETS.

city-hash-128-with-seed (octets x y &key (start 0) (end (length octets))

Hashes the contents of OCTETS, a vector of (UNSIGNED-BYTE 8), from index
START to index END together with seeds X and Y, each of type
(UNSIGNED-BYTE 64), and returns the 128-bit hash value as two values of
type (UNSIGNED-BYTE 64).  START defaults to zero, while END defaults to the
length of OCTETS.

city-hash-128 (octets &key (start 0) (end (length octets))

Hashes the contents of OCTETS, a vector of (UNSIGNED-BYTE 8), from index
START to index END and returns the 128-bit hash value as two values of type
(UNSIGNED-BYTE 64).  START defaults to zero, while END defaults to the
length of OCTETS.

Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 city-hash

Author

Robert Brown

License

MIT License. See the copyright messages in individual files.

Description

CityHash hash functions

Long Description

A Common Lisp implementation of Google’s CityHash family of hash functions. The Lisp algorithm is identical to that of Google’s open source C++ code, release 1.1.1

Version

1.8

Defsystem Dependency

com.google.base

Dependencies
Source

city-hash.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 city-hash.asd

Location

city-hash.asd

Systems

city-hash (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 city-hash/package.lisp

Parent

city-hash (system)

Location

package.lisp

Packages

city-hash


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 city-hash/city-hash.lisp

Dependency

package.lisp (file)

Parent

city-hash (system)

Location

city-hash.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 city-hash

An implementation of the CityHash family of hash functions.

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: city-hash-128 OCTETS &key START END

Hashes the contents of OCTETS, a vector of (UNSIGNED-BYTE 8), from index START to index END and returns the 128-bit hash value as two values of type (UNSIGNED-BYTE 64). START defaults to zero, while END defaults to the length of OCTETS.

Package

city-hash

Source

city-hash.lisp (file)

Function: city-hash-128-with-seed OCTETS X Y &key START END

Hashes the contents of OCTETS, a vector of (UNSIGNED-BYTE 8), from index START to index END together with seeds X and Y, each of type (UNSIGNED-BYTE 64), and returns the 128-bit hash value as two values of type (UNSIGNED-BYTE 64). START defaults to zero, while END defaults to the length of OCTETS.

Package

city-hash

Source

city-hash.lisp (file)

Function: city-hash-32 OCTETS &key START END

Hashes the contents of OCTETS, a vector of (UNSIGNED-BYTE 8) from index START to index END and returns the 32-bit hash value as an (UNSIGNED-BYTE 32). START defaults to zero, while END defaults to the length of OCTETS.

Package

city-hash

Source

city-hash.lisp (file)

Function: city-hash-64 OCTETS &key START END

Hashes the contents of OCTETS, a vector of (UNSIGNED-BYTE 8) from index START to index END and returns the 64-bit hash value as an (UNSIGNED-BYTE 64). START defaults to zero, while END defaults to the length of OCTETS.

Package

city-hash

Source

city-hash.lisp (file)

Function: city-hash-64-with-seed OCTETS SEED &key START END

Hashes the contents of OCTETS, a vector of (UNSIGNED-BYTE 8), from index START to index END together with SEED of type (UNSIGNED-BYTE 64), and returns the 64-bit hash value as an (UNSIGNED-BYTE 64). START defaults to zero, while END defaults to the length of OCTETS.

Package

city-hash

Source

city-hash.lisp (file)

Function: city-hash-64-with-seeds OCTETS SEED0 SEED1 &key START END

Hashes the contents of OCTETS, a vector of (UNSIGNED-BYTE 8), from index START to index END together with seeds SEED0 and SEED1, each of type (UNSIGNED-BYTE 64), and returns the 64-bit hash value as an (UNSIGNED-BYTE 64). START defaults to zero, while END defaults to the length of OCTETS.

Package

city-hash

Source

city-hash.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Constants

Constant: +c1+
Package

city-hash

Source

city-hash.lisp (file)

Constant: +c2+
Package

city-hash

Source

city-hash.lisp (file)

Constant: +empty-octet-vector+
Package

city-hash

Source

city-hash.lisp (file)

Constant: +k+
Package

city-hash

Source

city-hash.lisp (file)

Constant: +k0+
Package

city-hash

Source

city-hash.lisp (file)

Constant: +k1+
Package

city-hash

Source

city-hash.lisp (file)

Constant: +k2+
Package

city-hash

Source

city-hash.lisp (file)

Constant: +n+
Package

city-hash

Source

city-hash.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Macros

Macro: incf32 PLACE X

Increment, modulo 2^32, PLACE by X.

Package

city-hash

Source

city-hash.lisp (file)

Macro: incf64 PLACE X

Increment, modulo 2^64, PLACE by X.

Package

city-hash

Source

city-hash.lisp (file)

Macro: logxorf PLACE X

Logically exclusive or PLACE by X.

Package

city-hash

Source

city-hash.lisp (file)

Macro: mod-2^32 X
Package

city-hash

Source

city-hash.lisp (file)

Macro: mod-2^64 X
Package

city-hash

Source

city-hash.lisp (file)

Macro: mulf32 PLACE X

Multiply, modulo 2^32, PLACE by X.

Package

city-hash

Source

city-hash.lisp (file)

Macro: mulf64 PLACE X

Multiply, modulo 2^64, PLACE by X.

Package

city-hash

Source

city-hash.lisp (file)

Macro: rotatef-right-32 PLACE X

Rotate 32-bit PLACE right by X bit positions.

Package

city-hash

Source

city-hash.lisp (file)

Macro: u32* X Y
Package

city-hash

Source

city-hash.lisp (file)

Macro: u32+ X Y
Package

city-hash

Source

city-hash.lisp (file)

Macro: u64* X Y
Package

city-hash

Source

city-hash.lisp (file)

Macro: u64+ X Y
Package

city-hash

Source

city-hash.lisp (file)

Macro: u64- X Y
Package

city-hash

Source

city-hash.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: city-murmur OCTETS X Y START LENGTH

Returns a 128-bit hash code. Based on City and Murmur128.

Package

city-hash

Source

city-hash.lisp (file)

Function: fmix H

A 32-bit to 32-bit integer hash copied from Murmur3.

Package

city-hash

Source

city-hash.lisp (file)

Function: hash32-length-0-to-4 OCTETS INDEX LENGTH
Package

city-hash

Source

city-hash.lisp (file)

Function: hash32-length-13-to-24 OCTETS INDEX LENGTH
Package

city-hash

Source

city-hash.lisp (file)

Function: hash32-length-5-to-12 OCTETS INDEX LENGTH
Package

city-hash

Source

city-hash.lisp (file)

Function: hash64-length-0-to-16 OCTETS INDEX LENGTH
Package

city-hash

Source

city-hash.lisp (file)

Function: hash64-length-16 U V MUL
Package

city-hash

Source

city-hash.lisp (file)

Function: hash64-length-17-to-32 OCTETS INDEX LENGTH
Package

city-hash

Source

city-hash.lisp (file)

Function: hash64-length-33-to-64 OCTETS INDEX LENGTH
Package

city-hash

Source

city-hash.lisp (file)

Function: mur A H

Helper from Murmur3 for combining two 32-bit values.

Package

city-hash

Source

city-hash.lisp (file)

Function: rotate-right-32 X SHIFT
Package

city-hash

Source

city-hash.lisp (file)

Function: rotate-right-64 X SHIFT
Package

city-hash

Source

city-hash.lisp (file)

Function: shift-mix X
Package

city-hash

Source

city-hash.lisp (file)

Function: weak-hash64-length-32-with-seeds OCTETS INDEX A B
Package

city-hash

Source

city-hash.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
city-hash.asd: The city-hash․asd file
city-hash/city-hash.lisp: The city-hash/city-hash․lisp file
city-hash/package.lisp: The city-hash/package․lisp file

F
File, Lisp, city-hash.asd: The city-hash․asd file
File, Lisp, city-hash/city-hash.lisp: The city-hash/city-hash․lisp file
File, Lisp, city-hash/package.lisp: The city-hash/package․lisp file

L
Lisp File, city-hash.asd: The city-hash․asd file
Lisp File, city-hash/city-hash.lisp: The city-hash/city-hash․lisp file
Lisp File, city-hash/package.lisp: The city-hash/package․lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   C   F   H   I   L   M   R   S   U   W  
Index Entry  Section

C
city-hash-128: Exported functions
city-hash-128-with-seed: Exported functions
city-hash-32: Exported functions
city-hash-64: Exported functions
city-hash-64-with-seed: Exported functions
city-hash-64-with-seeds: Exported functions
city-murmur: Internal functions

F
fmix: Internal functions
Function, city-hash-128: Exported functions
Function, city-hash-128-with-seed: Exported functions
Function, city-hash-32: Exported functions
Function, city-hash-64: Exported functions
Function, city-hash-64-with-seed: Exported functions
Function, city-hash-64-with-seeds: Exported functions
Function, city-murmur: Internal functions
Function, fmix: Internal functions
Function, hash32-length-0-to-4: Internal functions
Function, hash32-length-13-to-24: Internal functions
Function, hash32-length-5-to-12: Internal functions
Function, hash64-length-0-to-16: Internal functions
Function, hash64-length-16: Internal functions
Function, hash64-length-17-to-32: Internal functions
Function, hash64-length-33-to-64: Internal functions
Function, mur: Internal functions
Function, rotate-right-32: Internal functions
Function, rotate-right-64: Internal functions
Function, shift-mix: Internal functions
Function, weak-hash64-length-32-with-seeds: Internal functions

H
hash32-length-0-to-4: Internal functions
hash32-length-13-to-24: Internal functions
hash32-length-5-to-12: Internal functions
hash64-length-0-to-16: Internal functions
hash64-length-16: Internal functions
hash64-length-17-to-32: Internal functions
hash64-length-33-to-64: Internal functions

I
incf32: Internal macros
incf64: Internal macros

L
logxorf: Internal macros

M
Macro, incf32: Internal macros
Macro, incf64: Internal macros
Macro, logxorf: Internal macros
Macro, mod-2^32: Internal macros
Macro, mod-2^64: Internal macros
Macro, mulf32: Internal macros
Macro, mulf64: Internal macros
Macro, rotatef-right-32: Internal macros
Macro, u32*: Internal macros
Macro, u32+: Internal macros
Macro, u64*: Internal macros
Macro, u64+: Internal macros
Macro, u64-: Internal macros
mod-2^32: Internal macros
mod-2^64: Internal macros
mulf32: Internal macros
mulf64: Internal macros
mur: Internal functions

R
rotate-right-32: Internal functions
rotate-right-64: Internal functions
rotatef-right-32: Internal macros

S
shift-mix: Internal functions

U
u32*: Internal macros
u32+: Internal macros
u64*: Internal macros
u64+: Internal macros
u64-: Internal macros

W
weak-hash64-length-32-with-seeds: Internal functions

Jump to:   C   F   H   I   L   M   R   S   U   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   +  
C  
Index Entry  Section

+
+c1+: Internal constants
+c2+: Internal constants
+empty-octet-vector+: Internal constants
+k+: Internal constants
+k0+: Internal constants
+k1+: Internal constants
+k2+: Internal constants
+n+: Internal constants

C
Constant, +c1+: Internal constants
Constant, +c2+: Internal constants
Constant, +empty-octet-vector+: Internal constants
Constant, +k+: Internal constants
Constant, +k0+: Internal constants
Constant, +k1+: Internal constants
Constant, +k2+: Internal constants
Constant, +n+: Internal constants

Jump to:   +  
C  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
city-hash: The city-hash system
city-hash: The city-hash package

P
Package, city-hash: The city-hash package

S
System, city-hash: The city-hash system

Jump to:   C   P   S