• Home
Name Date Size #Lines LOC

..--

.gitignoreD03-May-2024169 2118

Android.bpD03-May-2024566 3229

COPYINGD03-May-202417.7 KiB340281

MakefileD03-May-20245.4 KiB173103

README.mdD03-May-20242.9 KiB7257

bench.cD03-May-202422 KiB557404

bench.hD03-May-20241.4 KiB3911

datagen.cD03-May-20245.8 KiB190117

datagen.hD03-May-20241.6 KiB413

lz4.1D03-May-20248.3 KiB232230

lz4.1.mdD03-May-20247.5 KiB235172

lz4cli.cD03-May-202430.4 KiB710535

lz4io.cD03-May-202441.8 KiB1,176823

lz4io.hD03-May-20243.7 KiB10929

platform.hD03-May-20246.7 KiB15595

util.hD03-May-202419.5 KiB586446

README.md

1Command Line Interface for LZ4 library
2============================================
3
4Command Line Interface (CLI) can be created using the `make` command without any additional parameters.
5There are also multiple targets that create different variations of CLI:
6- `lz4` : default CLI, with a command line syntax close to gzip
7- `lz4c` : Same as `lz4` with additional support legacy lz4 commands (incompatible with gzip)
8- `lz4c32` : Same as `lz4c`, but forced to compile in 32-bits mode
9
10
11#### Aggregation of parameters
12CLI supports aggregation of parameters i.e. `-b1`, `-e18`, and `-i1` can be joined into `-b1e18i1`.
13
14
15
16#### Benchmark in Command Line Interface
17CLI includes in-memory compression benchmark module for lz4.
18The benchmark is conducted using a given filename.
19The file is read into memory.
20It makes benchmark more precise as it eliminates I/O overhead.
21
22The benchmark measures ratio, compressed size, compression and decompression speed.
23One can select compression levels starting from `-b` and ending with `-e`.
24The `-i` parameter selects a number of seconds used for each of tested levels.
25
26
27
28#### Usage of Command Line Interface
29The full list of commands can be obtained with `-h` or `-H` parameter:
30```
31Usage :
32      lz4 [arg] [input] [output]
33
34input   : a filename
35          with no FILE, or when FILE is - or stdin, read standard input
36Arguments :
37 -1     : Fast compression (default)
38 -9     : High compression
39 -d     : decompression (default for .lz4 extension)
40 -z     : force compression
41 -f     : overwrite output without prompting
42--rm    : remove source file(s) after successful de/compression
43 -h/-H  : display help/long help and exit
44
45Advanced arguments :
46 -V     : display Version number and exit
47 -v     : verbose mode
48 -q     : suppress warnings; specify twice to suppress errors too
49 -c     : force write to standard output, even if it is the console
50 -t     : test compressed file integrity
51 -m     : multiple input files (implies automatic output filenames)
52 -r     : operate recursively on directories (sets also -m)
53 -l     : compress using Legacy format (Linux kernel compression)
54 -B#    : Block size [4-7] (default : 7)
55 -BD    : Block dependency (improve compression ratio)
56--no-frame-crc : disable stream checksum (default:enabled)
57--content-size : compressed frame includes original size (default:not present)
58--[no-]sparse  : sparse mode (default:enabled on file, disabled on stdout)
59Benchmark arguments :
60 -b#    : benchmark file(s), using # compression level (default : 1)
61 -e#    : test all compression levels from -bX to # (default : 1)
62 -i#    : minimum evaluation time in seconds (default : 3s)
63 -B#    : cut file into independent blocks of size # bytes [32+]
64                      or predefined block size [4-7] (default: 7)
65```
66
67#### License
68
69All files in this directory are licensed under GPL-v2.
70See [COPYING](COPYING) for details.
71The text of the license is also included at the top of each source file.
72