From: Paul Cruz Date: Wed, 12 Jul 2017 23:40:24 +0000 (-0700) Subject: added copyright header, removed clean from makefile X-Git-Tag: v1.3.1^2~13^2^2~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c16edd26ac531d358cad5031ac3f12bed12f45b;p=thirdparty%2Fzstd.git added copyright header, removed clean from makefile --- diff --git a/contrib/adaptive-compression/Makefile b/contrib/adaptive-compression/Makefile index 38e3a7787..ed1a55ad4 100644 --- a/contrib/adaptive-compression/Makefile +++ b/contrib/adaptive-compression/Makefile @@ -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 $@ diff --git a/contrib/adaptive-compression/adapt.c b/contrib/adaptive-compression/adapt.c index e9230ddb1..67fb75646 100644 --- a/contrib/adaptive-compression/adapt.c +++ b/contrib/adaptive-compression/adapt.c @@ -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 /* fprintf */ +#include /* malloc, free */ +#include /* pthread functions */ +#include /* 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__); } } @@ -11,13 +27,6 @@ #define DEFAULT_ADAPT_PARAM 1 typedef unsigned char BYTE; -#include /* fprintf */ -#include /* malloc, free */ -#include /* pthread functions */ -#include /* 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 */