removedup 1.0.2__tar.gz → 1.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {removedup-1.0.2/removedup.egg-info → removedup-1.0.4}/PKG-INFO +1 -1
- removedup-1.0.4/dedup.cpp +45 -0
- removedup-1.0.4/dedup.hpp +10 -0
- {removedup-1.0.2 → removedup-1.0.4/removedup.egg-info}/PKG-INFO +1 -1
- {removedup-1.0.2 → removedup-1.0.4}/setup.py +1 -1
- removedup-1.0.2/dedup.cpp +0 -102
- removedup-1.0.2/dedup.hpp +0 -21
- {removedup-1.0.2 → removedup-1.0.4}/CMakeLists.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/LICENSE +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/MANIFEST.in +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/README.md +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/main.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/pyproject.toml +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/removedup.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/removedup.egg-info/SOURCES.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/removedup.egg-info/dependency_links.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/removedup.egg-info/not-zip-safe +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/removedup.egg-info/requires.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/removedup.egg-info/top_level.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/setup.cfg +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/tests/test_rdup.py +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/cxxopts.hpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/CMakeLists.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/LICENSE +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/attr.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/buffer_info.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/cast.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/chrono.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/common.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/complex.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/detail/class.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/detail/common.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/detail/descr.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/detail/init.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/detail/internals.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/detail/type_caster_base.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/detail/typeid.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/eigen/common.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/eigen/matrix.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/eigen/tensor.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/eigen.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/embed.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/eval.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/functional.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/gil.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/iostream.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/numpy.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/operators.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/options.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/pybind11.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/pytypes.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/stl/filesystem.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/stl.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/stl_bind.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/type_caster_pyobject_ptr.h +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/CMakeLists.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/cross_module_gil_utils.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/cross_module_interleaved_error_already_set.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/eigen_tensor_avoid_stl_array.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/pybind11_cross_module_tests.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/pybind11_tests.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_async.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_buffers.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_builtin_casters.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_call_policies.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_callbacks.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_chrono.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_class.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_cmake_build/CMakeLists.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_cmake_build/embed.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_cmake_build/main.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_const_name.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_constants_and_functions.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_copy_move.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_custom_type_casters.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_custom_type_setup.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_docstring_options.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_eigen_matrix.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_eigen_tensor.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_embed/CMakeLists.txt +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_embed/catch.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_embed/external_module.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_embed/test_interpreter.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_enum.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_eval.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_exceptions.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_factory_constructors.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_gil_scoped.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_iostream.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_kwargs_and_defaults.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_local_bindings.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_methods_and_attributes.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_modules.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_multiple_inheritance.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_numpy_array.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_numpy_dtypes.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_numpy_vectorize.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_opaque_types.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_operator_overloading.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_pickling.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_pytypes.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_sequences_and_iterators.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_smart_ptr.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_stl.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_stl_binders.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_tagbased_polymorphic.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_thread.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_type_caster_pyobject_ptr.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_union.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_unnamed_namespace_a.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_unnamed_namespace_b.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_vector_unique_ptr_member.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tests/test_virtual_functions.cpp +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/FindCatch.cmake +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/FindEigen3.cmake +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/FindPythonLibsNew.cmake +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/JoinPaths.cmake +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/check-style.sh +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/cmake_uninstall.cmake.in +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/codespell_ignore_lines_from_errors.py +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/libsize.py +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/make_changelog.py +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/pybind11.pc.in +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/pybind11Common.cmake +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/pybind11Config.cmake.in +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/pybind11NewTools.cmake +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/pybind11Tools.cmake +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/pyproject.toml +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/setup_global.py.in +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/setup_main.py.in +0 -0
- {removedup-1.0.2 → removedup-1.0.4}/vendor/xxh32.hpp +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#include "dedup.hpp"
|
|
2
|
+
|
|
3
|
+
std::tuple<std::string, std::string, size_t> dedup(const std::string &src, const std::string &tgt){
|
|
4
|
+
std::ifstream src_if(src, std::ios_base::in | std::ios_base::binary);
|
|
5
|
+
if (!src_if.is_open()) throw std::runtime_error("Cannot open " + src);
|
|
6
|
+
|
|
7
|
+
std::ifstream tgt_if(tgt, std::ios_base::in | std::ios_base::binary);
|
|
8
|
+
if (!tgt_if.is_open()) throw std::runtime_error("Cannot open " + tgt);
|
|
9
|
+
|
|
10
|
+
std::unordered_map<std::uint32_t, bool> seen;
|
|
11
|
+
|
|
12
|
+
std::string src_out = src + ".dedup";
|
|
13
|
+
std::string tgt_out = tgt + ".dedup";
|
|
14
|
+
|
|
15
|
+
std::ofstream src_of(src_out, std::ios::trunc);
|
|
16
|
+
std::ofstream tgt_of(tgt_out, std::ios::trunc);
|
|
17
|
+
|
|
18
|
+
std::string line_s = "";
|
|
19
|
+
std::string line_t = "";
|
|
20
|
+
size_t removed = 0;
|
|
21
|
+
|
|
22
|
+
while(true) {
|
|
23
|
+
std::getline(src_if, line_s);
|
|
24
|
+
std::getline(tgt_if, line_t);
|
|
25
|
+
if (src_if.eof()) break;
|
|
26
|
+
|
|
27
|
+
std::uint32_t hash = xxh32::hash(line_s.c_str(), static_cast<uint32_t>(line_s.size()), 0);
|
|
28
|
+
|
|
29
|
+
bool line_exists = seen.count(hash) > 0;
|
|
30
|
+
if (!line_exists) {
|
|
31
|
+
seen[hash] = true;
|
|
32
|
+
src_of << line_s << "\n";
|
|
33
|
+
tgt_of << line_t << "\n";
|
|
34
|
+
}else{
|
|
35
|
+
removed++;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
src_of.close();
|
|
40
|
+
tgt_of.close();
|
|
41
|
+
src_if.close();
|
|
42
|
+
tgt_if.close();
|
|
43
|
+
|
|
44
|
+
return std::make_tuple(src_out, tgt_out, removed);
|
|
45
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#include <iostream>
|
|
2
|
+
#include <fstream>
|
|
3
|
+
#include <unordered_map>
|
|
4
|
+
#include <cstring>
|
|
5
|
+
#include <tuple>
|
|
6
|
+
#include <string>
|
|
7
|
+
|
|
8
|
+
#include "vendor/xxh32.hpp"
|
|
9
|
+
|
|
10
|
+
std::tuple<std::string, std::string, size_t> dedup(const std::string &src, const std::string &tgt);
|
removedup-1.0.2/dedup.cpp
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
#include "dedup.hpp"
|
|
2
|
-
|
|
3
|
-
std::tuple<std::string, std::string, size_t> dedup(const std::string &src, const std::string &tgt){
|
|
4
|
-
#if defined(_WIN32) || defined(_WIN64)
|
|
5
|
-
HANDLE file_handle = CreateFile(src.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
|
6
|
-
if (file_handle == INVALID_HANDLE_VALUE) {
|
|
7
|
-
throw std::runtime_error("Unable to open " + src);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
DWORD file_size = GetFileSize(file_handle, NULL);
|
|
11
|
-
HANDLE file_mapping = CreateFileMapping(file_handle, NULL, PAGE_READONLY, 0, 0, NULL);
|
|
12
|
-
if (file_mapping == NULL) {
|
|
13
|
-
CloseHandle(file_handle);
|
|
14
|
-
throw std::runtime_error("File mapping failed.");
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const char* file_data = static_cast<const char*>(MapViewOfFile(file_mapping, FILE_MAP_READ, 0, 0, file_size));
|
|
18
|
-
if (file_data == NULL) {
|
|
19
|
-
CloseHandle(file_mapping);
|
|
20
|
-
CloseHandle(file_handle);
|
|
21
|
-
throw std::runtime_error("Memory mapping failed.");
|
|
22
|
-
}
|
|
23
|
-
#else
|
|
24
|
-
int fd = open(src.c_str(), O_RDONLY);
|
|
25
|
-
if (fd == -1) throw std::runtime_error("Unable to open " + src);
|
|
26
|
-
|
|
27
|
-
struct stat file_stat;
|
|
28
|
-
if (fstat(fd, &file_stat) == -1) {
|
|
29
|
-
close(fd);
|
|
30
|
-
throw std::runtime_error("Unable to get file size for " + src);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
off_t file_size = file_stat.st_size;
|
|
34
|
-
const char* file_data = static_cast<const char*>(mmap(NULL, file_size, PROT_READ, MAP_PRIVATE, fd, 0));
|
|
35
|
-
if (file_data == MAP_FAILED) {
|
|
36
|
-
close(fd);
|
|
37
|
-
throw std::runtime_error("Memory mapping failed.");
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
#endif
|
|
41
|
-
|
|
42
|
-
std::unordered_multimap<std::uint32_t, std::string_view> lines;
|
|
43
|
-
|
|
44
|
-
std::ifstream tgt_is(tgt);
|
|
45
|
-
if (!tgt_is.is_open()) throw std::runtime_error("Cannot open " + tgt);
|
|
46
|
-
|
|
47
|
-
std::string src_out = src + ".dedup";
|
|
48
|
-
std::string tgt_out = tgt + ".dedup";
|
|
49
|
-
|
|
50
|
-
std::ofstream src_of(src_out, std::ios::trunc);
|
|
51
|
-
std::ofstream tgt_of(tgt_out, std::ios::trunc);
|
|
52
|
-
|
|
53
|
-
const char* line_start = file_data;
|
|
54
|
-
const char* line_end = file_data;
|
|
55
|
-
std::string line_buf = "";
|
|
56
|
-
size_t removed = 0;
|
|
57
|
-
|
|
58
|
-
for (const char* ptr = file_data; ptr < file_data + file_size; ++ptr) {
|
|
59
|
-
if (*ptr == '\n' || ptr == file_data + file_size - 1) {
|
|
60
|
-
std::getline(tgt_is, line_buf);
|
|
61
|
-
|
|
62
|
-
line_end = ptr + 1;
|
|
63
|
-
std::string_view line_view(line_start, line_end - line_start);
|
|
64
|
-
|
|
65
|
-
std::uint32_t hash = xxh32::hash(line_start, static_cast<uint32_t>(line_end - line_start), 0);
|
|
66
|
-
auto range = lines.equal_range(hash);
|
|
67
|
-
|
|
68
|
-
bool line_exists = false;
|
|
69
|
-
for (auto it = range.first; it != range.second; ++it) {
|
|
70
|
-
if (it->second == line_view) {
|
|
71
|
-
line_exists = true;
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (!line_exists) {
|
|
77
|
-
lines.emplace(hash, line_view);
|
|
78
|
-
|
|
79
|
-
src_of << line_view;
|
|
80
|
-
tgt_of << line_buf << (*ptr == '\n' ? "\n" : "");
|
|
81
|
-
}else{
|
|
82
|
-
removed++;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
line_start = line_end;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
#if defined(_WIN32) || defined(_WIN64)
|
|
90
|
-
UnmapViewOfFile(file_data);
|
|
91
|
-
CloseHandle(file_mapping);
|
|
92
|
-
CloseHandle(file_handle);
|
|
93
|
-
#else
|
|
94
|
-
munmap(const_cast<char*>(file_data), file_stat.st_size);
|
|
95
|
-
close(fd);
|
|
96
|
-
#endif
|
|
97
|
-
|
|
98
|
-
src_of.close();
|
|
99
|
-
tgt_of.close();
|
|
100
|
-
|
|
101
|
-
return std::make_tuple(src_out, tgt_out, removed);
|
|
102
|
-
}
|
removedup-1.0.2/dedup.hpp
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#include <iostream>
|
|
2
|
-
#include <fstream>
|
|
3
|
-
#include <unordered_map>
|
|
4
|
-
#include <string_view>
|
|
5
|
-
#include <cstring>
|
|
6
|
-
#include <tuple>
|
|
7
|
-
#include <variant>
|
|
8
|
-
#include <string>
|
|
9
|
-
|
|
10
|
-
#if defined(_WIN32) || defined(_WIN64)
|
|
11
|
-
#include <windows.h>
|
|
12
|
-
#else
|
|
13
|
-
#include <sys/mman.h>
|
|
14
|
-
#include <sys/stat.h>
|
|
15
|
-
#include <fcntl.h>
|
|
16
|
-
#include <unistd.h>
|
|
17
|
-
#endif
|
|
18
|
-
|
|
19
|
-
#include "vendor/xxh32.hpp"
|
|
20
|
-
|
|
21
|
-
std::tuple<std::string, std::string, size_t> dedup(const std::string &src, const std::string &tgt);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/detail/type_caster_base.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/include/pybind11/type_caster_pyobject_ptr.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{removedup-1.0.2 → removedup-1.0.4}/vendor/pybind11/tools/codespell_ignore_lines_from_errors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|