Commit Graph

145 Commits

Author SHA1 Message Date
Filipe Calasans
781417a369 Implement -m option with legacy format on cli 2020-02-07 17:03:13 -08:00
Filipe Calasans
ac4940cd98 Fix lz4cli --list option 2020-02-06 21:39:54 -08:00
Jerome Duval
935b432be1 bring support for Haiku up to date. 2019-11-07 14:32:38 +01:00
Reto Koradi
cc91777c98 Make benchmark compatible with dictionary compression
Support the -D command line option for running benchmarks. The
benchmark code was slightly restructured to factor out the calls
that need to be different for each benchmark scenario. Since there
are now 4 scenarios (all combinations of fast/HC and with/without
dictionary), the logic was getting somewhat convoluted otherwise.

This was done by extending the compressionParameters struct that
previously contained just a single function pointer. It now
contains 4 function pointers for init/reset/compress/cleanup,
with the related state. The functions get a pointer to the
structure as their first argument (inspired by C++), so that they
can access the state values in the struct.
2019-11-05 23:38:00 -08:00
WHR
eee8cc79e7 lz4cli: add option '--best' as an alias of '-12' 2019-07-23 13:37:11 +08:00
Yann Collet
baf9b0e043 fix #734 : --version should output to stdout
instead of stderr
2019-06-24 16:08:30 -07:00
gabrielstedman
729eef61a1 Handle file not existing case #704 2019-05-26 15:04:45 +01:00
gstedman
81081f9b2d List mode improvements.
Improve formatting
  Include static assert
  Use UTIL_fseek to handle potential fseek limitation
  Be explicit when refusing to read from stdin
  Properly free dctx after use
  Include valgrind tests
2019-05-16 20:53:29 +01:00
Yann Collet
ae5cea9112 fixed C90 compliance
re-structure code, have everything into a single section of lz4io.c
2019-04-22 12:27:25 -07:00
gabrielstedman
0acebbe53d FR #598 - Move LZ4F_compFileInfo_t def to lz4frame.h discard output_file
assert if in om_list mode
2019-04-22 10:02:46 +01:00
gabrielstedman
9d0960c354 Merge https://github.com/lz4/lz4 into dev 2019-04-22 09:56:51 +01:00
gabrielstedman
2133366da0 FR #598 - Make LZ4IO_getCompressedFileInfo internal and reword func 2019-04-22 09:00:20 +01:00
Yann Collet
22fae16c6f ensure tests work when stdout is not the console
ensure this case is continuously tested on travis.

Update documentation on implicit output,
invite to not rely on implicit output in scripts.
2019-04-21 17:01:03 -07:00
gabrielstedman
5fdc6d201e FR #598 Improve initial design, test mallocs, support C90. 2019-04-21 18:20:40 +01:00
gabrielstedman
55484191c4 correctly use unisgned int for index 2019-04-21 00:20:38 +01:00
gabrielstedman
55ab3c48ae Add --list option to display compressed file information. 2019-04-21 00:01:03 +01:00
Yann Collet
5f8ac02b77 cli: display a warning whenever default output is stdout while input != stdin
This behavior has been preserved for compatibility with existing ecosystem.
But it's problematic, as some environment start `lz4` without identifying stdout as console by default,
leading to a change of behavior for a same line of script.

A more sensible policy would be to default to stdout only when input is stdin.

Soft change for the time being : keep the behavior, just print a warning message.
User should prefer `-c` to explicitly select `stdout`.

Also : updated tests in Makefile to explicitly select `stdout` with `-c`.
2019-04-19 17:08:40 -07:00
Yann Collet
e865a3e7ec fixed lz4 -m -c
can compress multiple files into stdout
2019-04-12 15:17:48 -07:00
Yann Collet
20c2a5fc94 added command -BI for "Independent Blocks"
This is the reverse of `-BD`, and the current default.

This command can be useful to reverse a previous `-BD` command.
It may in the future be more important
if `lz4` switches to generating dependent blocks by default.
2019-04-12 13:27:11 -07:00
Tim Zakian
416916146f Add constant pointer annotations 2019-01-10 20:40:00 -08:00
Tim Zakian
5822e667cc Remove a bunch of global variables that tracked settings for the IO module, and move them in to a struct 2019-01-10 15:27:47 -08:00
Tim Zakian
9028682e7a Fix pass-through mode 2019-01-10 10:20:17 -08:00
Ruben O. Chiavone
e6905b5812 Fix lz4 extension in input filename not causing decompression 2019-01-08 22:56:04 -03:00
Blaise Sanouillet
32501603c7 support custom block sizes: fix usage message & remove unused functions 2018-09-28 09:53:14 -07:00
Blaise Sanouillet
64ad395d27 support custom block sizes 2018-09-28 08:02:49 -07:00
Yann Collet
e34a27d291 fixed minor cppcheck warnings in programs 2018-09-18 16:08:17 -07:00
Yann Collet
0fea528e3a updated documentation regarding dictionary compression
following suggestion from @stbrumme (#558)

Also : bumped version number, regenerated man page and html doc
2018-09-05 14:05:08 -07:00
Jennifer Liu
8745638d7c Fixed invalid argument test and reformatted else 2018-06-26 17:53:12 -07:00
Jennifer Liu
9ee5183d9b Fixed code based on comments from pull request 2018-06-26 17:31:15 -07:00
Jennifer Liu
536b79afd9 Added --fast command to cli 2018-06-25 17:46:39 -07:00
Yann Collet
5c7d3812d9 fasterDecSpeed can be triggered from cli with --favor-decSpeed 2018-04-26 15:49:32 -07:00
Yann Collet
1faa7e2698 bench: introduced hidden command -S
to benchmark multiple files with separate results
2018-03-19 17:19:25 -07:00
Yann Collet
dccf8826f1 lz4cli : minor rewrite of lz4c legacy commands
for clarity
2017-10-14 23:50:07 -07:00
Yann Collet
2d827e1b28 lz4cli : removed extension artefacts
It used to be useful for an old Windows variant which is no longer maintained.
2017-10-14 18:48:00 -07:00
W. Felix Handte
2bd85f4199 Add Dictionary Support to the Command Line Tool 2017-10-09 20:16:00 -04:00
Yann Collet
a30cba08f4 fixed a bunch of -Wcomma warnings
reported by @rvandermeulen (#398)
2017-09-10 14:32:38 -07:00
Yann Collet
a1f3a27e9b Merge branch 'dev' into installVars and fixed conflicts 2017-08-15 16:57:00 -07:00
Yann Collet
01cdbfb5fe lz4c legacy commands are now enabled at runtime based on link/binary name "lz4c"
instead of selected at compilation time depending on a macro.
This design makes it possible to have a single binary which supports both modes.

An advantageous side effect is that when doing `make; make install`
no additional binary is created during `make install`
(it used to create `lz4c`, because `make` would only build `lz4`)
2017-08-14 16:56:05 -07:00
Yann Collet
930a692110 cli : restored command -BX to enable block checksum (#322) 2017-08-11 17:58:46 -07:00
Chocobo1
a4ec7fa7b7 Fix gcc7 Wimplicit-fallthrough warnings
For the default Wimplicit-fallthrough=3 level,
the comment should start with "fall*"
2017-06-19 13:57:35 +08:00
Yann Collet
03d8586fca cli accept block sizes with KB / MB prefixes 2017-05-26 14:38:47 -07:00
Alexey Tourbin
a41df535f7 lz4cli.c: fix a comment: LZ4HC_DEFAULT_CLEVEL -> LZ4HC_CLEVEL_MAX
Actually the program only mentions LZ4HC_CLEVEL_MAX.
2017-04-29 16:18:37 +03:00
Yann Collet
84246b974e Merge pull request #341 from iburinoc/exematch
Ignore extensions in exe name matching
2017-03-24 20:42:27 -07:00
Sean Purcell
e9c3b14f29 Ignore extensions in exe name matching 2017-03-24 16:33:14 -07:00
Dmitry V. Levin
b1daffc4e5 cli: add GNU separator -- specifying that all following arguments are files
This option is supported by other compressors with compatible cli,
so add it to lz4 as well for better compatibility.
2017-03-23 03:48:51 +00:00
Chocobo1
44f95e92ea Fix printf specifier 2017-01-13 00:36:24 +08:00
Yann Collet
b41f9bb132 Merge pull request #292 from inikep/dev
improved POSIX
2016-12-22 11:58:29 +01:00
Yann Collet
52cac9a973 updated a few macros names 2016-12-22 11:41:05 +01:00
Przemyslaw Skibinski
64cbc4e1dc improved MinGW support 2016-12-21 10:22:40 +01:00
Przemyslaw Skibinski
452cc970d6 reordered definitons in platform.h 2016-12-20 23:38:32 +01:00