renamed files
This commit is contained in:
@@ -18,15 +18,15 @@ CFLAGS += $(DEBUGFLAGS)
|
|||||||
CFLAGS += $(MOREFLAGS)
|
CFLAGS += $(MOREFLAGS)
|
||||||
FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
|
FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
|
||||||
|
|
||||||
all: clean v1 v2
|
all: clean single multi
|
||||||
v1: $(ZSTD_FILES) v1.c
|
single: $(ZSTD_FILES) single.c
|
||||||
$(CC) $(FLAGS) $^ -o $@
|
$(CC) $(FLAGS) $^ -o $@
|
||||||
|
|
||||||
v2: $(ZSTD_FILES) v2.c
|
multi: $(ZSTD_FILES) multi.c
|
||||||
$(CC) $(FLAGS) $^ -o $@
|
$(CC) $(FLAGS) $^ -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@$(RM) -f v1 v2
|
@$(RM) -f single multi
|
||||||
@$(RM) -rf *.dSYM
|
@$(RM) -rf *.dSYM
|
||||||
@$(RM) -f tmp*
|
@$(RM) -f tmp*
|
||||||
@echo "finished cleaning"
|
@echo "finished cleaning"
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ static void* outputThread(void* arg)
|
|||||||
size_t const compressedSize = job->compressedSize;
|
size_t const compressedSize = job->compressedSize;
|
||||||
if (ZSTD_isError(compressedSize)) {
|
if (ZSTD_isError(compressedSize)) {
|
||||||
DISPLAY("Error: an error occurred during compression\n");
|
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);
|
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 */
|
/* return 0 if successful, else return error */
|
||||||
int main(int argCount, const char* argv[])
|
int main(int argCount, const char* argv[])
|
||||||
{
|
{
|
||||||
if (argCount < 2) {
|
if (argCount < 3) {
|
||||||
DISPLAY("Error: not enough arguments\n");
|
DISPLAY("Error: not enough arguments\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,6 @@
|
|||||||
make clean v2
|
make clean multi
|
||||||
./v2 tests/test2048.pdf tmp.zst
|
./multi tests/test2048.pdf tmp.zst
|
||||||
|
zstd -d tmp.zst
|
||||||
|
diff tmp tests/test2048.pdf
|
||||||
|
echo "diff test complete"
|
||||||
|
make clean
|
||||||
|
|||||||
Reference in New Issue
Block a user