Common
FileExt
djb2_hash(string)
djb2 hash (http://www.cse.yorku.ca/~oz/hash.html)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
string |
String
|
the string to be hashed |
required |
Return
hash (String): hash value
Source code in src/utils/common.py
file_type(file_path)
Guess a file type based upon a file extension (mimetypes module)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path |
String
|
the file path |
required |
Return
magic_ext
Source code in src/utils/common.py
fnv1a_hash(string)
FNV-1a 32bit hash (http://isthe.com/chongo/tech/comp/fnv/)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
string |
String
|
the string to be hashed |
required |
Return
hash (String): hash value
Source code in src/utils/common.py
sdbm_hash(string)
sdbm hash (http://www.cse.yorku.ca/~oz/hash.html)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
string |
String
|
the string to be hashed |
required |
Return
hash (String): hash value