Bimba Shrestha
9d9cfa9ef9
Adding assert and using ZSTD_STRATEGY_MAX as ZSTD_NB_STRATEGIES
2020-01-30 17:54:01 -08:00
Bimba Shrestha
6ad2f0d7d6
Adding back one cast and using UTIL_FILESIZE_UNKNOWN to check unknown file size
2020-01-30 17:16:02 -08:00
Bimba Shrestha
6bf05a53ab
Documenting in the man file
2020-01-30 17:11:38 -08:00
Bimba Shrestha
c203341292
Removing more casts
2020-01-30 17:07:58 -08:00
Bimba Shrestha
2a0771cfdb
Removing unnecessary cast
2020-01-30 17:05:33 -08:00
Bimba Shrestha
b0ceab4dc0
Moving default cparams back, checking for unknown file size, using getCParams()
2020-01-30 16:52:07 -08:00
Bimba Shrestha
b660ef87f8
Convertion nit U32 -> size_t
2020-01-30 14:29:04 -08:00
Bimba Shrestha
71754a26f8
Update comment
2020-01-30 14:14:27 -08:00
Bimba Shrestha
2f10019b92
Adding --show-default-cparams (show cparams before compressing
2020-01-30 14:12:03 -08:00
Nick Terrell
7ec87cfb28
Update comment in timefn
2020-01-22 11:17:30 -08:00
Nick Terrell
768adc0774
Fix timefn on android
2020-01-21 18:57:16 -08:00
Nick Terrell
fa48af545f
Add --single-thread to zstd --help
2020-01-17 13:54:49 -08:00
Nick Terrell
f6d00c059f
[util] Fix readLineFromFile on Cygwin
2020-01-13 14:37:22 -08:00
Nick Terrell
f27b4b4ec5
Merge pull request #1948 from lazka/cygwin-fix-c99-build
...
Fix the c99/cmake build under Cygwin/MSYS2
2020-01-13 11:35:28 -08:00
Christoph Reiter
ddd4c39736
Fix the c99/cmake build under Cygwin/MSYS2
...
When building zst under cygwin or msys2 with std=c99 the build would fail because
of an undefined fileno()/_fileno(), which is used by the IS_CONSOLE() macro.
When building with -std=c99 (gcc otherwise defaults to gnu, which implies POSIX),
which is the default of the cmake build, then including unistd.h wont define
_POSIX_VERSION and all other headers also wont expose POSIX API.
To fix this make sure to define _POSIX_C_SOURCE with the version we want before including
unistd.h and so that _POSIX_VERSION is set to the version provided by the system.
Since Cygwin/MSYS2 just follow POSIX we can also remove their special cases for
defining IS_CONSOLE().
And, for completeness, also explicitly include stdio.h which is what actually declares fileno().
Tested with the normal make file and cmake under MSYS2 and Cygwin.
2020-01-11 01:39:10 +01:00
Bimba Shrestha
f25a6e9f8f
Adding new cli endpoint --patch-from= ( #1940 )
...
* Adding new cli endpoint --diff-from=
* Appveyor conversion nit
* Using bool set trick instead of direct set
* Removing --diff-from and only leaving --diff-from=#
* Throwing error when both dictFileName vars are set
* Clean up syntax
* Renaming diff-from to patch-from
* Revering comma separated syntax clean up
* Updating playtests with patch-from
* Uncommenting accidentally commented
* Updating remaining docs and var names to be patch-from instead of diff-from
* Constifying
* Using existing log2 function and removing newly created one
* Argument order (moving prefs to end)
* Using comma separated syntax
* Moving to outside #ifndef
2020-01-10 14:25:24 -08:00
Christoph Reiter
d0dcaf56c2
Make UTIL_countPhysicalCores() work under Cygwin ( #1941 )
...
Cygwin currently uses the fallback implementation which just returns 1 every time,
which leads to bad performance when zstd is called with -T0 for example.
Instead use the POSIX implementation used for the BSDs which works just fine under Cygwin.
Tested under Cygwin and MSYS2.
2020-01-07 15:48:26 -08:00
Bimba Shrestha
ef1684f29a
[doc] Adding -M# decompression operation modifier documentation ( #1938 )
...
* Adding -M# operation modifier documentation
* Adding long name, typo and update desc
2020-01-03 16:36:47 -08:00
W. Felix Handte
e2a99db2dd
Also Define _ATFILE_SOURCE
2019-12-23 13:24:28 -05:00
W. Felix Handte
5666835ea7
Add Comment
2019-12-23 13:24:28 -05:00
W. Felix Handte
5af8cb7aea
Use statbuf->st_mtim Again
2019-12-23 13:24:28 -05:00
Yann Collet
901e545173
Merge pull request #1907 from selavy/check-fread-r1895
...
Check for fread failure
2019-12-03 15:31:11 -08:00
Yann Collet
4b4de7493f
refactoring : remove global variable g_displayOut
...
displaying into stderr or stdout is now an explicit operation,
no longer depending on some global state set elsewhere in the code.
2019-12-02 16:19:03 -08:00
Yann Collet
a49417b5af
fix recent issue combining -r with empty list of input files
...
This would resize the table of input filenames to zero,
delivering an empty table,
to which it was no longer possible to add stdin.
2019-12-02 14:28:18 -08:00
Yann Collet
d3ec368e13
Merge pull request #1910 from facebook/travisTest
...
mingw cross compilation test
2019-11-27 18:45:16 -08:00
Yann Collet
93ec5cfd05
Merge pull request #1883 from Ericson2314/fix-mingw-cross
...
Fix MinGW cross
2019-11-27 14:48:26 -08:00
Peter Lesslie
8eb499d354
Check for fread failure
...
On failure fread may return either a short read or 0. Need to use
ferror to detect error versus eof.
2019-11-26 20:47:58 -06:00
Yann Collet
d5b4a7ea58
removed scanbuild workaround
2019-11-26 17:46:57 -08:00
Yann Collet
96ee20758c
assembleFNT() can no longer fail
2019-11-26 15:44:33 -08:00
Yann Collet
aaab618ae9
pushed aside stdio.h too
...
since only UTIL_DISPLAY() depended on it.
2019-11-26 15:25:32 -08:00
Yann Collet
7543cd055c
moved UTIL_DISPLAY() inside util.c
2019-11-26 15:21:58 -08:00
Yann Collet
a684b82774
util: isolated some dependencies
...
from *.h to *.c
so that they don't get transitively included
into users of util.h.
2019-11-26 15:16:53 -08:00
Yann Collet
2d9fad4f52
fixed minor VS warning, on parameter difference
...
complaining about a `const` property on one side but not the other.
2019-11-26 14:53:37 -08:00
Yann Collet
f622c0adf3
switched UTIL_refFilename() to an assert()
2019-11-26 14:48:23 -08:00
Yann Collet
c71bd45a3b
Merge branch 'dev' into ahmed_file
2019-11-26 11:20:26 -08:00
Yann Collet
5e657aca90
silence scan-build false positive
...
blind attempt
2019-11-25 15:50:58 -08:00
Yann Collet
9a3de0a535
changed name from createX to assembleX
...
shows that the resulting object just takes ownership of provided buffer.
2019-11-25 15:34:55 -08:00
Yann Collet
b1de3ecdd5
fix mode_t on Windows
2019-11-25 13:59:35 -08:00
Yann Collet
9a22140ef4
created UTIL_chmod()
...
protecting "/dev/null" from having its permissions changed.
also : minor : improved consistency of util.h API
2019-11-25 13:45:22 -08:00
Yann Collet
7aaac3f69c
fix #1904
...
/dev/null permissions were modified when using sudo rights.
This fixes this bug during decompression.
More importantly, this patch adds a test, triggered in TravisCI,
ensuring unaltered /dev/null permissions.
2019-11-25 10:35:36 -08:00
Yann Collet
d4ce04c3e7
Merge pull request #1897 from sergey-dryabzhinsky/patch-1
...
WIP: Fix typo in util.c
2019-11-22 17:25:55 -08:00
Yann Collet
c8fd2cf4c9
Merge pull request #1887 from bimbashrestha/doc-fix
...
Fixing hashLog error 2^26=64Mib
2019-11-19 16:14:20 -08:00
Sergey Dryabzhinsky
612a06eb3e
Update util.c
2019-11-19 23:24:00 +03:00
Sergey Dryabzhinsky
f62cf1fff5
Fix typo in util.c
...
There must be mtim*e*
2019-11-19 23:15:28 +03:00
Bimba Shrestha
b032a6e1d9
Updated some more outdated bounds
2019-11-19 09:55:13 -08:00
John Ericson
10552eaffe
Fix MinGW cross install from Unix
...
Needed a bunch of `$(EXT)`
2019-11-14 14:19:07 -05:00
John Ericson
0ede342acc
Fix MinGW cross build from Unix
...
generate_res.bat seems rather pointless, am I missing something? I just
inlined it into the Makefile.
2019-11-14 14:19:06 -05:00
Bimba Shrestha
982830b081
Fixing hashLog error 2^26=64Mib
2019-11-14 10:48:55 -08:00
John Ericson
106278e7e5
Use lowercase windows.h
...
Helps for cross builds, doesn't matter on Windows itself.
2019-11-12 19:03:01 -05:00
Yann Collet
2ed5344e84
added target zstd-dictBuilder
...
check that the dictBuilder can be compiled
with only lib/common and lib/compress as dependencies.
2019-11-06 15:46:58 -08:00