xxhash {xxhashlite}R Documentation

Calculate the hash of an arbitrary R object.

Description

This function will calculate the hash of any object understood by base::serialize().

Usage

xxhash(robj, algo = "xxh128", as_raw = FALSE)

Arguments

robj

Any R object

algo

Select the specific xxhash algorithm. Default: 'xxh128'. (the latest algorithm in the xxhash family) Valid values: 'xxh32', 'xxh64', 'xxh128', 'xxh3'

as_raw

Return the hash as a raw vector of bytes instead of string? Default: FALSE. If TRUE, then the raw bytes are returned in big-endian order - which is what xxHash considers the canonical form.

Value

String representation of hash. If as_raw = TRUE then a raw vector is returned instead.

Examples

xxhash(mtcars)
xxhash(mtcars, algo = 'xxh3', as_raw = TRUE)

[Package xxhashlite version 0.2.2 Index]