updated programs/README.md
This commit is contained in:
parent
f38adde9e0
commit
8847faffbf
3
Makefile
3
Makefile
@ -68,7 +68,6 @@ clean:
|
|||||||
@$(MAKE) -C $(TESTDIR) $@ > $(VOID)
|
@$(MAKE) -C $(TESTDIR) $@ > $(VOID)
|
||||||
@$(MAKE) -C $(LZ4DIR) $@ > $(VOID)
|
@$(MAKE) -C $(LZ4DIR) $@ > $(VOID)
|
||||||
@$(MAKE) -C examples $@ > $(VOID)
|
@$(MAKE) -C examples $@ > $(VOID)
|
||||||
@$(MAKE) -C versionsTest $@ > $(VOID)
|
|
||||||
@$(RM) lz4$(EXT)
|
@$(RM) lz4$(EXT)
|
||||||
@echo Cleaning completed
|
@echo Cleaning completed
|
||||||
|
|
||||||
@ -113,7 +112,7 @@ armtest: clean
|
|||||||
CFLAGS="-O3 -Werror" $(MAKE) -C $(TESTDIR) bins CC=arm-linux-gnueabi-gcc
|
CFLAGS="-O3 -Werror" $(MAKE) -C $(TESTDIR) bins CC=arm-linux-gnueabi-gcc
|
||||||
|
|
||||||
versionsTest: clean
|
versionsTest: clean
|
||||||
$(MAKE) -C versionsTest
|
$(MAKE) -C $(TESTDIR) $@
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
$(MAKE) -C $(LZ4DIR)
|
$(MAKE) -C $(LZ4DIR)
|
||||||
|
@ -1,6 +1,67 @@
|
|||||||
This directory `programs` contains source files
|
Command Line Interface for LZ4 library
|
||||||
to generate `lz4` command line utility,
|
============================================
|
||||||
and many test tools, such as `fuzzer`, `fullbench` and such.
|
|
||||||
|
Command Line Interface (CLI) can be created using the `make` command without any additional parameters.
|
||||||
|
There are however other Makefile targets that create different variations of CLI:
|
||||||
|
- `lz4` : default CLI supporting gzip-like arguments
|
||||||
|
- `lz4c` : Same as `lz4` with additional support for decompression of legacy lz4 versions
|
||||||
|
- `lz4c32` : Same as `lz4c`, but forced to compile in 32-bits mode
|
||||||
|
|
||||||
|
|
||||||
|
#### Aggregation of parameters
|
||||||
|
CLI supports aggregation of parameters i.e. `-b1`, `-e18`, and `-i1` can be joined into `-b1e18i1`.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Benchmark in Command Line Interface
|
||||||
|
CLI includes in-memory compression benchmark module for lz4.
|
||||||
|
The benchmark is conducted using a given filename.
|
||||||
|
The file is read into memory.
|
||||||
|
It makes benchmark more precise as it eliminates I/O overhead.
|
||||||
|
|
||||||
|
The benchmark measures ratio, compressed size, compression and decompression speed.
|
||||||
|
One can select compression levels starting from `-b` and ending with `-e`.
|
||||||
|
The `-i` parameter selects a number of iterations used for each of tested levels.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Usage of Command Line Interface
|
||||||
|
The full list of options can be obtained with `-h` or `-H` parameter:
|
||||||
|
```
|
||||||
|
Usage :
|
||||||
|
lz4 [arg] [input] [output]
|
||||||
|
|
||||||
|
input : a filename
|
||||||
|
with no FILE, or when FILE is - or stdin, read standard input
|
||||||
|
Arguments :
|
||||||
|
-1 : Fast compression (default)
|
||||||
|
-9 : High compression
|
||||||
|
-d : decompression (default for .lz4 extension)
|
||||||
|
-z : force compression
|
||||||
|
-f : overwrite output without prompting
|
||||||
|
-h/-H : display help/long help and exit
|
||||||
|
|
||||||
|
Advanced arguments :
|
||||||
|
-V : display Version number and exit
|
||||||
|
-v : verbose mode
|
||||||
|
-q : suppress warnings; specify twice to suppress errors too
|
||||||
|
-c : force write to standard output, even if it is the console
|
||||||
|
-t : test compressed file integrity
|
||||||
|
-m : multiple input files (implies automatic output filenames)
|
||||||
|
-l : compress using Legacy format (Linux kernel compression)
|
||||||
|
-B# : Block size [4-7](default : 7)
|
||||||
|
-BD : Block dependency (improve compression ratio)
|
||||||
|
--no-frame-crc : disable stream checksum (default:enabled)
|
||||||
|
--content-size : compressed frame includes original size (default:not present)
|
||||||
|
--[no-]sparse : sparse mode (default:enabled on file, disabled on stdout)
|
||||||
|
Benchmark arguments :
|
||||||
|
Benchmark arguments :
|
||||||
|
-b# : benchmark file(s), using # compression level (default : 1)
|
||||||
|
-e# : test all compression levels from -bX to # (default: 1)
|
||||||
|
-i# : iteration loops [1-9](default : 3), benchmark mode only
|
||||||
|
```
|
||||||
|
|
||||||
|
#### License
|
||||||
|
|
||||||
All files in this directory are licensed under GPL-v2.
|
All files in this directory are licensed under GPL-v2.
|
||||||
See [COPYING](COPYING) for details.
|
See [COPYING](COPYING) for details.
|
||||||
|
@ -37,7 +37,7 @@ BINDIR := $(PREFIX)/bin
|
|||||||
MANDIR := $(PREFIX)/share/man/man1
|
MANDIR := $(PREFIX)/share/man/man1
|
||||||
LZ4DIR := ../lib
|
LZ4DIR := ../lib
|
||||||
PRGDIR := ../programs
|
PRGDIR := ../programs
|
||||||
TESTDIR := lz4test
|
TESTDIR := versionsTest
|
||||||
PYTHON?= python3
|
PYTHON?= python3
|
||||||
|
|
||||||
CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make
|
CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make
|
||||||
|
Loading…
Reference in New Issue
Block a user