From 56edfefb9718f72bd45093e0efd76bd88645fa89 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 18 Sep 2022 16:04:24 +0200 Subject: block writer: move block comaprison to utility function Slightly modify the byte-for-byte comparison function to compare an arbitrary range in a file and move it to libutil. Instead of calling it for each block in the block writer, simply let it check an entire range in the block writer and compute the range position/size of the reference ahead, before looking for potential matches. Signed-off-by: David Oberhollenzer --- lib/sqfs/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqfs/Makemodule.am') diff --git a/lib/sqfs/Makemodule.am b/lib/sqfs/Makemodule.am index ad3d42d..b1c9d94 100644 --- a/lib/sqfs/Makemodule.am +++ b/lib/sqfs/Makemodule.am @@ -44,7 +44,7 @@ libsquashfs_la_LIBADD += $(ZSTD_LIBS) $(PTHREAD_LIBS) # directly "import" stuff from libutil libsquashfs_la_SOURCES += lib/util/str_table.c lib/util/alloc.c -libsquashfs_la_SOURCES += lib/util/xxhash.c +libsquashfs_la_SOURCES += lib/util/xxhash.c lib/util/file_cmp.c libsquashfs_la_SOURCES += lib/util/hash_table.c include/util/hash_table.h libsquashfs_la_SOURCES += lib/util/rbtree.c include/util/rbtree.h libsquashfs_la_SOURCES += lib/util/array.c include/util/array.h -- cgit v1.2.3