View source: R/quick_signature.R
| quick_signature | R Documentation |
Generates a lightweight content signature by hashing sampled byte regions from a file. The signature provides a fast operational approximation for detecting identical or differing file instances without computing a full cryptographic hash.
quick_signature(path, n = 1024)
path |
Character. Path to the file. |
n |
Integer. Number of bytes sampled from selected regions (default: 1024). |
The function is designed for large-scale observational workflows where complete file hashing would be unnecessarily expensive.
The signature is constructed by hashing sampled byte regions:
small files: full file content
medium files: beginning and end
large files: beginning, middle and end
The resulting signature is intended as a fast observational aid:
identical signatures suggest identical file content;
differing signatures indicate differing file content;
collisions are possible but unlikely in operational use.
Missing or inaccessible files return NA_character_.
The signature does not establish authoritative identity or provenance. It provides lightweight observational evidence that may support later contextual reconstruction, duplicate detection, version analysis, or Record Set construction.
Unlike quick_signature_text(), this function operates on the
binary representation of a file rather than its textual content.
Character. A lightweight operational signature.
quick_signature_text(),
scan_storage(),
summarise_duplicates()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.