]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
renamed files
authorPaul Cruz <paulcruz74@fb.com>
Wed, 5 Jul 2017 16:57:50 +0000 (09:57 -0700)
committerPaul Cruz <paulcruz74@fb.com>
Wed, 5 Jul 2017 16:57:50 +0000 (09:57 -0700)
contrib/adaptive-compression/Makefile
contrib/adaptive-compression/multi.c [moved from contrib/adaptive-compression/v2.c with 99% similarity]
contrib/adaptive-compression/run.sh
contrib/adaptive-compression/single.c [moved from contrib/adaptive-compression/v1.c with 100% similarity]

index fbab219c37b2a29fc3b29bf43813f917a31152d8..c6862198b3a21df7e83b59a41d3bc88e6fe67cdd 100644 (file)
@@ -18,15 +18,15 @@ CFLAGS   += $(DEBUGFLAGS)
 CFLAGS   += $(MOREFLAGS)
 FLAGS     = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
 
-all: clean v1 v2
-v1: $(ZSTD_FILES) v1.c
+all: clean single multi
+single: $(ZSTD_FILES) single.c
        $(CC) $(FLAGS) $^ -o $@
 
-v2: $(ZSTD_FILES) v2.c
+multi: $(ZSTD_FILES) multi.c
        $(CC) $(FLAGS) $^ -o $@
 
 clean:
-       @$(RM) -f v1 v2
+       @$(RM) -f single multi
        @$(RM) -rf *.dSYM
        @$(RM) -f tmp*
        @echo "finished cleaning"
similarity index 99%
rename from contrib/adaptive-compression/v2.c
rename to contrib/adaptive-compression/multi.c
index c25f1db82b882989e9697c3fbd18218d01d3af70..e1fa31774d260106362a6452b60467c06b211612 100644 (file)
@@ -174,7 +174,7 @@ static void* outputThread(void* arg)
             size_t const compressedSize = job->compressedSize;
             if (ZSTD_isError(compressedSize)) {
                 DISPLAY("Error: an error occurred during compression\n");
-                return arg; 
+                return arg;
             }
             {
                 size_t const writeSize = fwrite(ctx->jobs[currJob].dst.start, 1, compressedSize, ctx->dstFile);
@@ -253,7 +253,7 @@ static int createCompressionJob(adaptCCtx* ctx, BYTE* data, size_t srcSize)
 /* return 0 if successful, else return error */
 int main(int argCount, const char* argv[])
 {
-    if (argCount < 2) {
+    if (argCount < 3) {
         DISPLAY("Error: not enough arguments\n");
         return 1;
     }
index f9e27673098a77c2690834df3be9505ca1d9eb28..b9c4caf7f341bb60b0d7d645624b3d88afd9bb93 100755 (executable)
@@ -1,2 +1,6 @@
-make clean v2
-./v2 tests/test2048.pdf tmp.zst
+make clean multi
+./multi tests/test2048.pdf tmp.zst
+zstd -d tmp.zst
+diff tmp tests/test2048.pdf
+echo "diff test complete"
+make clean