]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
added copyright header, removed clean from makefile
authorPaul Cruz <paulcruz74@fb.com>
Wed, 12 Jul 2017 23:40:24 +0000 (16:40 -0700)
committerPaul Cruz <paulcruz74@fb.com>
Wed, 12 Jul 2017 23:40:24 +0000 (16:40 -0700)
contrib/adaptive-compression/Makefile
contrib/adaptive-compression/adapt.c

index 38e3a7787755b5a3739b076021f33474f22e9987..ed1a55ad453309290c318204e278e3487db65134 100644 (file)
@@ -19,7 +19,7 @@ CFLAGS   += $(DEBUGFLAGS)
 CFLAGS   += $(MOREFLAGS)
 FLAGS     = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
 
-all: clean adapt
+all: adapt
 
 adapt: $(ZSTD_FILES) adapt.c
        $(CC) $(FLAGS) $^ -o $@
index e9230ddb1826ec8514546ffb680f4bc4afb747e7..67fb7564690f166ad30e233aff7763635c39b22d 100644 (file)
@@ -1,3 +1,19 @@
+/**
+ * Copyright (c) 2017-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+
+#include <stdio.h>      /* fprintf */
+#include <stdlib.h>     /* malloc, free */
+#include <pthread.h>    /* pthread functions */
+#include <string.h>     /* memset */
+#include "zstd_internal.h"
+#include "util.h"
+
 #define DISPLAY(...) fprintf(stderr, __VA_ARGS__)
 #define PRINT(...) fprintf(stdout, __VA_ARGS__)
 #define DEBUG(l, ...) { if (g_displayLevel>=l) { DISPLAY(__VA_ARGS__); } }
 #define DEFAULT_ADAPT_PARAM 1
 typedef unsigned char BYTE;
 
-#include <stdio.h>      /* fprintf */
-#include <stdlib.h>     /* malloc, free */
-#include <pthread.h>    /* pthread functions */
-#include <string.h>     /* memset */
-#include "zstd_internal.h"
-#include "util.h"
-
 static int g_displayLevel = DEFAULT_DISPLAY_LEVEL;
 static unsigned g_compressionLevel = DEFAULT_COMPRESSION_LEVEL;
 static unsigned g_displayStats = 0;
@@ -138,7 +147,7 @@ static adaptCCtx* createCCtx(unsigned numJobs, const char* const outFilename)
     ctx->jobReadyID = 0;
     ctx->jobCompressedID = 0;
     ctx->jobWriteID = 0;
-    ctx->targetDictSize = FILE_CHUNK_SIZE >> 15;
+    ctx->targetDictSize = 1 << 12;
     ctx->lastDictSize = 0;
     ctx->jobs = calloc(1, numJobs*sizeof(jobDescription));
     /* initializing jobs */