8 lines
1.0 KiB
Markdown
8 lines
1.0 KiB
Markdown
# Architecture
|
|
|
|
File Tools is a static React/Vite application wrapped in the shared Toolbox shell. Browser `File` handles and small metadata records remain on the main thread; one fresh module worker performs each inspection or streaming hash and is terminated on completion, cancellation, timeout, replacement or unmount.
|
|
|
|
The worker reads at most 1 MiB from each end for signature, entropy, text and string heuristics. SHA-256 and SHA-512 are updated together in 1 MiB chunks, so hashing does not buffer the complete file. The hex view independently reads one 512-byte window. `file/signatures.ts` contains project-owned evidence heuristics; `file-type` provides broader signature hints; `@noble/hashes` provides incremental hashes.
|
|
|
|
`file/manifest.ts` sorts by path and emits JSON or spreadsheet-neutralised CSV. Duplicate groups start as same-size candidates and become stronger same-hash candidates after explicit hashing; no deletion or mutation follows. Relative worker and asset URLs keep the build relocatable below a nested portal path.
|