-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME
More file actions
139 lines (96 loc) · 3.4 KB
/
Copy pathREADME
File metadata and controls
139 lines (96 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
WHAT:
=====
ua finds sets of files which are identical and kua finds files which
are identical to the given file.
LICENSE:
=======
Mozilla Public License, http://www.mozilla.org/MPL/
Also see the copyright notes in the source files.
BUILD:
======
This project supports both autotools and CMake build systems.
AUTOTOOLS (Traditional):
-----------------------
$ sh autogen.sh CFLAGS= CXXFLAGS=-O3
$ make
$ sudo make install
Or use the convenience build script:
$ ./build.sh autotools
CMAKE (Modern):
---------------
$ mkdir build && cd build
$ cmake ..
$ make
$ sudo make install
Or use the convenience build script:
$ ./build.sh cmake
BUILD SCRIPT:
-------------
The project includes a convenient build script that supports both systems:
$ ./build.sh # Build with autotools (default)
$ ./build.sh cmake # Build with CMake
$ ./build.sh -c autotools # Clean and build with autotools
$ ./build.sh -j4 cmake # Build with CMake using 4 jobs
$ ./build.sh --help # Show all options
RELEASE TARBALLS:
=================
Create a tarball for GitHub Releases after building:
$ ./build.sh cmake # or autotools
$ ./scripts/make-release-tarball.sh --version v1.0.0
The archive (ua-<version>-<os>-<arch>.tar.gz) is written to dist/ and contains
an install-ready layout:
usr/bin/ua
usr/bin/kua
usr/share/man/man1/{ua.1,kua.1}
usr/share/doc/ua/{README,NEWS,ChangeLog,AUTHORS,COPYING,INSTALL}
The tarball helper will fail if the requested version differs from the
version embedded in the code (__UA_VERSION), to keep tags/releases in sync.
Use --allow-mismatch to override (not recommended).
PROJECT STRUCTURE:
==================
src/ - Source files (*.cc, *.c, *.h)
build/ - Build artifacts (object files, binaries)
man/man1/ - Man pages (ua.1, kua.1)
CMakeLists.txt - CMake build configuration
Makefile.am - Autotools build configuration
HASH ALGORITHMS:
================
The tool supports multiple hash algorithms via the -a option:
$ ua -a md5 # MD5 (default)
$ ua -a sha1 # SHA1
$ ua -a sha256 # SHA256
$ ua -a b3 # BLAKE3 (fast, secure)
$ ua -a xxh64 # xxHash64 (very fast)
NEW FEATURES:
=============
- Multiple hash algorithms (MD5, SHA1, SHA256, BLAKE3, xxHash64)
- BLAKE3 SIMD optimizations (SSE2, SSE4.1, AVX2, AVX512)
- Quote file names with -q option
- Modern project structure with src/ and build/ directories
- Dual build system support (autotools + CMake)
FILES:
======
src/filei.h: header with class and function definitions, can be used
in other tools
src/filei.cc: implementation of stuff defined in filei.h, can be included
in both static and dynamic libraries
src/ua.cc: main of ua
src/kua.cc: main of kua
man/man1/ua.1: man page for ua
man/man1/kua.1: man page for kua
DOCUMENTATION:
==============
src/filei.h extensively documents the interface. Sparse comments in the cc
files help in understanding the code.
USAGE:
======
After install, see the man page,
$ man ua
$ man kua
Or read the online help
$ ua -vh
$ kua -vh
Examples:
$ ua -a b3 * # Find duplicates using BLAKE3
$ kua -f file.txt -a xxh64 * # Find files identical to file.txt using xxHash64
$ ua -q -a sha256 * # Quote file names and use SHA256