Commit Graph

753 Commits

Author SHA1 Message Date
Yann Collet
6410f177c6 slighly better cpu time measurement for Windows
correctly skips the initialization part of the programs,
so that it's now on par with posix's clock().

In the future, would allow to measure cpu time between arbitrary points in the program execution, though for the time being, it's used for full session.
2024-08-03 09:51:55 -07:00
Yann Collet
f7e65802dc fix process time counter on Windows for very large files 2024-08-02 23:39:45 -07:00
Yann Collet
9d298e9540 -h only documents -T# when multithreading is enabled
fixes #1480
2024-07-28 21:30:29 -07:00
Ikko Eltociear Ashimine
7739164446
docs: update lz4conf.h
overriden -> overridden
2024-07-26 01:24:23 +09:00
Yann Collet
36df905aa6 update API and man page documentation for v1.10 2024-07-20 15:21:39 -07:00
Yann Collet
de6531b45b fixed minor conversion warning 2024-07-20 14:32:43 -07:00
Yann Collet
8ce9e94cd5 improved lorem ipsum generator speed by a factor > x8 2024-07-20 14:29:58 -07:00
Yann Collet
2a1de07855 improved speed of lorem ipsum generator
by > +80%.

This should help complete tests faster
2024-07-20 12:35:41 -07:00
Yann Collet
21837b9621 fixed traces 2024-07-19 18:19:07 -07:00
Yann Collet
d31aaac2ed Level 2 is now compatible with dictionary attach mode
but it requires that dictionary state is loaded with Level 2
2024-07-19 17:30:33 -07:00
Yann Collet
f458b2b1a5 LZ4_loadDictHC is compatible with LZ4MID level 2
But the state must have its compression level set _before_ loading the dictionary.
2024-07-17 23:01:08 -07:00
Yann Collet
4f88c7a49d exit on invalid frame 2024-07-15 21:58:56 -07:00
Yann Collet
4f25e37a75 --list automatically triggers -m 2024-07-14 23:49:57 -07:00
Yann Collet
470fb1c8bd Merge pull request #1442 from lz4/no_implicit_stdout
removed implicit stdout
2024-07-14 23:46:42 -07:00
Yann Collet
2db419ee23 removed implicit stdout
fixes #1193.

Implicit `stdout` has been a behavior of the `lz4` cli since its early days,
but it ends up being confusing for users, which do not expect this behavior.

The feature is already deprecated, it has been issuing a warning message for several years.
It's time to cut it out.
2024-07-12 22:24:42 -07:00
Yann Collet
aafb56ee2e update gpl license to 2.0-or-later
The text at the top of each source file was already specifying 2.0-or-later,
but this wasn't clearly reflected in the full-text license in COPYING,
which was the old 2.0 license, which can be interpreted as 2.0-only.

Note that the license of `liblz4`, the library in `lib/` directory,
is unchanged, and remains the more permissive `BSD 2-clause`.
2024-07-10 07:26:20 +02:00
Yann Collet
e36fadfd44 support multithreading for linked blocks with dictionary 2024-07-09 00:41:16 +02:00
Yann Collet
b3dd37f78f fix leak issue 2024-07-09 00:18:49 +02:00
Yann Collet
ed4d7d19bd Linked Blocks compression (-BD) can employ multiple threads
but does not support combination with dictionary yet.
2024-07-09 00:18:49 +02:00
Yann Collet
c78899a3a2 add support for environment variable LZ4_CLEVEL 2024-07-08 18:48:11 +02:00
Yann Collet
461881cf4a fixed c90 compliance 2024-07-08 02:47:08 +02:00
Yann Collet
461f369774 automatically enable multithreading by default on Windows
Completion Ports have been supported since basically forever.
2024-07-08 01:24:38 +02:00
Yann Collet
32f7fd3f38 minor completion port update
for consistency with pthread implementation
2024-07-07 13:59:44 -07:00
Yann Collet
cfdb8ac60b completion ports: minor readability refactor 2024-07-07 13:35:52 -07:00
Yann Collet
c688b4bd58 updated threadpool API 2024-07-07 13:22:46 -07:00
Yann Collet
50d541f9e3 simpler execution expression 2024-07-07 11:57:14 -07:00
Yann Collet
f0b29a973b updated completion ports logic
jobSlotAvail control job queue size,
end of jobs wait on a single event, instead of busy looping.
2024-07-07 11:45:22 -07:00
Yann Collet
1dc60aa1a2 minor: removed one variable 2024-07-07 09:08:14 -07:00
Yann Collet
2064a28454
Merge pull request #1432 from lz4/cpuload_windows
fix cpuload measurements on Windows
2024-07-06 18:52:32 -07:00
Yann Collet
5301a75c5a fix cpuload measurements on Windows
clock() does not behave the same (as posix) on Windows
2024-07-06 16:47:05 -07:00
Yann Collet
b7b0ee0a54 Add MT control via Environment variable LZ4_NBWORKERS 2024-07-06 23:04:43 +02:00
Yann Collet
8dd837fd44 document LZ4_NBWORKERS_MAX 2024-07-06 05:11:38 -07:00
Yann Collet
718d1dcad7 warning message when nbThreads above limit 2024-07-06 04:14:39 -07:00
Yann Collet
79e72beeb5 minor optimization: allocate worker array at runtime
this makes it possible to increase LZ4_NBWORKERS_MAX without memory cost
2024-07-06 04:05:28 -07:00
Yann Collet
04341f1974 changed Makefile variable HAVE_THREAD -> HAVE_MULTITHREAD
and updated documentation `programs/README.md`
2024-07-06 01:55:50 -07:00
Yann Collet
b5639ade0e fixed Visual Studio type warning 2024-07-06 01:36:19 -07:00
Yann Collet
71ef5b7256 Makefile: automatic MT detection under native msys2/mingw64 2024-07-05 18:52:46 -07:00
Yann Collet
10cc4e38ac fix C90 comment style 2024-07-05 18:25:48 -07:00
Yann Collet
604122c848 Makefile build automatically detect multithreading for Windows 2024-07-05 18:11:37 -07:00
Yann Collet
425cd51aa7 count nb cores on Windows 2024-07-05 18:00:18 -07:00
Yann Collet
c7fd52aebc fixed queue size control 2024-07-05 17:38:14 -07:00
Yann Collet
3628163d2a minor: Semaphore init value 2024-07-05 17:16:27 -07:00
Yann Collet
097f0fba84 minor parameter sanitization 2024-07-05 17:11:35 -07:00
Yann Collet
b4e3708823 queueLock no longer required 2024-07-05 16:45:07 -07:00
Yann Collet
7183fe9e04 minor simplification
less use of critical section
2024-07-05 14:57:03 -07:00
Yann Collet
9443ed9332 working implementation of completionPorts
to support multithreading and asyncio on Windows
2024-07-05 14:33:14 -07:00
Yann Collet
043745887c fixed tsan warnings
and gate some assert() to be triggered only when no TSAN test is ongoing
2024-07-05 13:52:35 +02:00
Yann Collet
c379947b61 fix pedantic warning 2024-07-05 11:20:24 +02:00
Yann Collet
2e867a5ab6 fix comments for C90 strict compatibility 2024-07-05 11:19:41 +02:00
Yann Collet
7b4e80481e fix minor cast warnings related to -Wc++-compat
note: it's questionable if the -Wc++-compat flag is really useful for lz4io.
Maybe it should be restricted to `/lib/`.
2024-07-05 11:17:48 +02:00