Yann Collet
be13653ad0
fix minor parse warning
2020-11-14 12:44:18 -08:00
Yann Collet
36eadb205a
all usages of prefs within lz4io are const
2020-11-14 12:40:17 -08:00
Yann Collet
7315c6e7a0
LZ4IO_openDstFile() doesn't need pref mutability
2020-11-14 11:13:08 -08:00
Yann Collet
849ebae524
fixed force --sparse mode
2020-11-14 10:52:19 -08:00
Yann Collet
5fa6417b2e
dictionary functions don't need prefs mutability
2020-11-13 22:20:49 -08:00
Yann Collet
772a312b00
LZ4IO_createDict() doesn't need prefs
2020-11-13 22:16:39 -08:00
Yann Collet
8af38013e0
LZ4IO_decompressSrcFile() doesn't need mutable prefs
2020-11-13 21:51:08 -08:00
Yann Collet
2b3445a269
selectDecoder() doesn't need mutable prefs
2020-11-13 21:49:43 -08:00
Yann Collet
8d37662e48
LZ4IO_passThrough() doesn't need prefs
2020-11-13 21:47:17 -08:00
Yann Collet
c8c3f8e62e
LZ4IO_decompressLZ4F() doesn't need mutable prefs
2020-11-13 20:57:26 -08:00
Yann Collet
a203cb2a6e
LZ4IO_decodeLegacyStream() doesn't need mutable prefs
2020-11-13 20:51:49 -08:00
Yann Collet
f81f3a254e
LZ4IO_fwriteSparse doesn't need writable prefs
2020-11-13 16:44:39 -08:00
Yann Collet
22729ecb8b
minor refactor
...
mostly on the compression code path
2020-11-13 11:55:33 -08:00
Yann Collet
b7c6fc9f61
minor refactor of lz4io
...
for readability.
Mostly around --list capability
2020-11-13 10:57:40 -08:00
Yann Collet
392809d66e
fix minor static analyzer warnings
...
detected by scan-build and cppcheck
fix #786
2020-09-29 17:09:58 -07:00
Niklas Hambüchen
a58b7ac6ce
fixup: Portable fileno()
2020-08-25 03:37:41 +02:00
Niklas Hambüchen
86edeb6784
fixup: C90 compliance, clean up stat() types/calls
2020-08-25 03:36:57 +02:00
Niklas Hambüchen
9a7658070a
Use fstat() to determine file size.
...
This allows us to get the file size even when the input file is passed
via stdin. This fixes `--content-size` not working in situations like
$ lz4 -v --content-size < /tmp/test > /tmp/test.lz4
Warning : cannot determine input content size
With this change, it works.
Also helps with #904 .
2020-08-24 06:27:28 +02:00
Yann Collet
3dd34df751
added target lz4-wlib
...
variant of lz4 linking to liblz4 dynamic library
requires the dynamic library to expose static-only symbols (experimental API)
Example for #888
2020-08-11 14:07:51 -07:00
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
Rosen Penev
a55095ddd6
util.h: Remove deprecated utime for non-Windows
...
utime was deprecated in POSIX 2008.
2019-09-10 11:29:05 -07:00
WHR
eee8cc79e7
lz4cli: add option '--best' as an alias of '-12'
2019-07-23 13:37:11 +08:00
Yann Collet
bb5c34a875
bumped version number to v1.9.2
...
to reduce risks that future bug reports in `dev` branch report `v1.9.1` as the failing version.
2019-07-01 09:01:43 -07: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
gstedman
98a86c8ef6
Add multiframe report to --list command
2019-05-15 21:13:19 +01:00
JPeterMugaas
7136489d33
More build imrpvements
...
Moved a few other tests to Makefiles.inc. Other things might need to go there.
Made a test for symlink appropriateness. Windows can NOT handle them the same way Unix-like operating systems do (if at all). This is mostly the same as the Visual C projects.
embed version info into .dll and .exes that are redistributed.
2019-04-23 07:44:00 -04:00
Yann Collet
291b3d8b7e
Merge pull request #691 from lz4/list
...
--list
2019-04-22 17:43:01 -07:00
Yann Collet
35b83a921f
fix: no leak when LZ4F_dctx creation fails
...
strange, because it previous implementation, it would `exit()`,
so it should not matter ...
2019-04-22 16:06:22 -07:00
Yann Collet
c4fe7a2047
Merge pull request #689 from JPeterMugaas/jpm-makefile
...
Jpm makefile - as described in https://github.com/lz4/lz4/issues/688
2019-04-22 15:29:50 -07:00
Yann Collet
5a50247d5f
updated code comments
2019-04-22 15:24:44 -07:00
Yann Collet
a685d5cffc
--list gives block type
2019-04-22 15:14:53 -07:00
Yann Collet
f401f1de7e
--list can resume after a failed file
2019-04-22 15:01:20 -07:00
JPeterMugaas
5e6807fd95
Make programs/Makefile use the includes.
2019-04-22 17:38:43 -04:00
Yann Collet
0d4c885abb
refactored --list function
...
better handling of special conditions,
better scoping of variables.
Also : updated man page
2019-04-22 14:01:19 -07: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
JPeterMugaas
773b66547f
Initial commits from diff I submitted earlier
2019-04-22 13:48:59 -04:00
gabrielstedman
84f978a2f3
FR #598 - Correctly initialize cfinfo & cast malloc res to (char*)
2019-04-22 11:07:08 +01:00
gabrielstedman
e31b6dc03c
FR #598 - Make fileSize unsigned long long
2019-04-22 10:35:29 +01: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