Martin Liska
4307e870a2
Rename ZSTDMT_NBTHREADS_MAX to ZSTDMT_NBWORKERS_MAX.
...
Rename it in zstd man page.
2020-07-07 00:18:20 +02:00
Xin Xie
9a8ccd4ba3
Add output-dir-mirror option
2020-06-24 22:12:11 -07:00
Bimba Shrestha
b06710889f
error when not using --stream-size on pipe
2020-06-18 09:31:06 -07:00
Bimba Shrestha
6653321ba3
passing streamSrcSize when set
2020-06-18 09:28:18 -07:00
Tobias Hieta
1c9b1ddac7
Update version documention with the support for -q
2020-06-11 10:56:47 +02:00
Tobias Hieta
b1cce9a6ad
Short version string output
...
This adds support for just showing the version string
without the full welcome message if the log level is
less than the default. That means that you pass -q once
and you will just see "1.4.5".
This makes it easier to parse in scripts.
2020-06-09 08:40:41 +02:00
Bimba Shrestha
e2838d9eb9
Spelling mistakes
2020-06-05 05:11:26 -05:00
Bimba Shrestha
f847909cf2
Using ZSTD_MAX_WINDOWLOG instead of INT_MAX
2020-05-26 09:23:26 -07:00
Bimba Shrestha
01b38ef162
Change --patch-from limit from 4gb to 2gb
2020-05-26 06:52:30 -07:00
Yann Collet
f22b371e31
updated documentation for v1.4.5
...
API manual and man pages
2020-05-14 16:17:03 -07:00
Bimba Shrestha
12071467d3
reverting docs and test
2020-05-13 15:22:07 -05:00
Bimba Shrestha
9b13077cfb
Revert to old zstdgrep
2020-05-13 15:12:14 -05:00
Yann Collet
f5f0bb2591
Merge pull request #2125 from Artoria2e5/patch-2
...
programs/Makefile: make it actually work with clang
2020-05-12 13:48:23 -07:00
Yann Collet
f13eb2ec01
Merge pull request #2123 from facebook/zstd_help
...
updated `zstd -h`
2020-05-11 18:54:07 -07:00
Bimba Shrestha
ef467fd428
documenting non-supported grep options for zstdgrep
2020-05-11 12:22:45 -05:00
Yann Collet
93ff2fb329
Merge pull request #2120 from facebook/clevel_doc
...
updated zstd CLI documentation
2020-05-11 09:42:33 -07:00
Mingye Wang
c3398d2dda
programs/Makefile: make it actually work with clang
...
Recent versions of clang seem to require a step of conversion from the profraw file to a "compiler-readable" profdata file to let PGO work.
2020-05-10 16:36:08 +08:00
Yann Collet
37b2dafbed
minor clarification on -o file
2020-05-08 14:20:47 -07:00
Yann Collet
e5366bee16
updated zstd -h
...
to help readability.
Group arguments into categories,
try to give better visibility to more common arguments.
2020-05-08 14:14:46 -07:00
W. Felix Handte
376c26bf56
Use Unused Variable
2020-05-08 16:43:39 -04:00
Yann Collet
d564d56440
document additional compilation macros
...
ZSTD_NOBENCH, ZSTD_NODICT, ZSTD_NOCOMPRESS, ZSTD_NODECOMPRESS
2020-05-08 13:35:59 -07:00
Yann Collet
4f2cb944a8
Merge branch 'dev' into clevel_doc
2020-05-08 11:59:45 -07:00
Yann Collet
e873697625
updated documentation regarding ZSTD_CLEVEL
...
make it clearer that it's useful for `tar --zstd`.
2020-05-08 10:51:37 -07:00
Mingye Wang
37d10b6c75
programs/README.md: update help text
...
I noticed that the help is outdated as there is no mention of --adapt. Y'all should probably put "update help text" into your release checklist.
2020-05-08 02:52:18 +08:00
Felix Handte
ad8dbae1b7
Merge pull request #2103 from felixhandte/relative-includes
...
Migrate Includes to Relative Paths
2020-05-06 09:42:23 -07:00
Bimba Shrestha
e7df0d41bb
Merge pull request #2095 from bimbashrestha/grep
...
[bugs] zstdgrep/grep inconsistencies
2020-05-06 11:18:15 -05:00
Bimba Shrestha
6ff16b4246
adding help text
2020-05-05 10:03:57 -07:00
Bimba Shrestha
a06a508bf3
fixing inconsistencies
2020-05-05 09:56:15 -07:00
W. Felix Handte
7dcca6bc64
Also Move programs/ Directory to Relative Includes
2020-05-04 15:20:26 -04:00
Yann Collet
6f62a9caaa
fixed zstd-nolegacy target
...
when compiled as part of allVariants
(though I'm unsure why it was working before ...)
2020-04-29 11:56:21 -07:00
Yann Collet
7ea2ae6649
added test linking user program to multi-threaded libzstd
2020-04-28 21:18:29 -07:00
Bimba Shrestha
659ff85cf5
changing to cParams.hashLog
2020-04-21 21:12:50 -05:00
Bimba Shrestha
b640802ff8
updating chainlog bound
2020-04-20 11:34:24 -07:00
Bimba Shrestha
587a20a12a
adding newline
2020-04-20 10:25:58 -07:00
Bimba Shrestha
5b0a452cac
Adding --long support for --patch-from ( #1959 )
...
* adding long support for patch-from
* adding refPrefix to dictionary_decompress
* adding refPrefix to dictionary_loader
* conversion nit
* triggering log mode on chainLog < fileLog and removing old threshold
* adding refPrefix to dictionary_round_trip
* adding docs
* adding enableldm + forceWindow test for dict
* separate patch-from logic into FIO_adjustParamsForPatchFromMode
* moving memLimit adjustment to outside ifdefs (need for decomp)
* removing refPrefix gate on dictionary_round_trip
* rebase on top of dev refPrefix change
* making sure refPrefx + ldm is < 1% of srcSize
* combining notes for patch-from
* moving memlimit logic inside fileio.c
* adding display for optimal parser and long mode trigger
* conversion nit
* fuzzer found heap-overflow fix
* another conversion nit
* moving FIO_adjustMemLimitForPatchFromMode outside ifndef
* making params immutable
* moving memLimit update before createDictBuffer call
* making maxSrcSize unsigned long long
* making dictSize and maxSrcSize params unsigned long long
* error on files larger than 4gb
* extend refPrefix test to include round trip
* conversion to size_t
* making sure ldm is at least 10x better
* removing break
* including zstd_compress_internal and removing redundant macros
* exposing ZSTD_cycleLog()
* using cycleLog instead of chainLog
* add some more docs about user optimizations
* formatting
2020-04-17 15:58:53 -05:00
Yann Collet
458a1a1723
minor refactor
...
- fix a few comments
- reorder some parameters, to enforce "mutable references first"
- simplified fwriteSparse()
2020-04-13 14:09:57 -07:00
Bimba Shrestha
d0412f3aba
no percentage on readsize == 0
2020-04-03 12:10:02 -07:00
Bimba Shrestha
bf1856c26f
removing max(1, ..)
2020-04-03 12:07:17 -07:00
Nick Terrell
ac58c8d720
Fix copyright and license lines
...
* All copyright lines now have -2020 instead of -present
* All copyright lines include "Facebook, Inc"
* All licenses are now standardized
The copyright in `threading.{h,c}` is not changed because it comes from
zstdmt.
The copyright and license of `divsufsort.{h,c}` is not changed.
2020-03-26 17:02:06 -07:00
Bimba Shrestha
22e7123a9a
targetLen -> targetLength
2020-03-23 06:25:08 -07:00
Bimba Shrestha
9388dac2c0
Setting ZSTD_c_contentSizeFlag instead of UNKNOWN filesize
2020-03-09 15:40:18 -05:00
Bimba Shrestha
84d6bd4c7f
Adding documentation
2020-03-09 14:50:49 -05:00
Bimba Shrestha
43874730f4
Adding --content-size
2020-03-09 14:19:05 -05:00
Bimba Shrestha
6d8e761ba3
Inverting content size prefs bool
2020-03-09 14:16:10 -05:00
Bimba Shrestha
03ee18d9c5
Adding (void)noContentSize
2020-03-09 14:00:52 -05:00
Bimba Shrestha
167244a64f
--no-content-size cli
2020-03-09 13:07:29 -05:00
Nick Terrell
f589e2b5c8
[zstdgrep] Remove -f because zstdcat implies it
2020-03-02 11:30:12 -08:00
Nick Terrell
2c10bbd866
[zstdgrep] Log zstd decompression errors to stderr
2020-03-02 11:25:36 -08:00
Bimba Shrestha
23165b387e
Adding hashLog to --show-default-cparams
2020-02-27 13:56:56 -08:00
Yann Collet
d2464776d1
man page : added --verbose
long command
...
also updated `zstd.1`
stacking prior updates completed on `zstd.1.md`.
2020-02-26 14:29:30 -08:00
Felix Handte
61eeca4bd6
Merge pull request #2007 from lgarrison/cli-allow-sizet
...
Allow some CLI options to accept numeric values up to size_t
2020-02-21 08:51:37 -08:00
Lehman Garrison
834d06b655
Allow some cli options to accept numeric values up to size_t instead of unsigned int
2020-02-20 14:29:58 -05:00
Bimba Shrestha
c9ce6db069
Merge pull request #1999 from bket/fix_have_lz4
...
Fix forgotten portable header prefix
2020-02-20 10:55:28 -08:00
Philip Jones
4e728e26ca
Fix integer parsing in cli ( #2003 )
2020-02-18 15:30:59 -08:00
Björn Ketelaars
cdd59c50e7
Fix forgotten portable header prefix
...
PR #1987 forgot to prefix another include causing lz4 detection to fail.
2020-02-15 12:42:00 +01:00
Bimba Shrestha
06a57cf57e
[build-issue] More portable header prefix usage (#) ( #1987 )
...
* make 4.3 build issue fix
* Changing header name and adding comment
2020-02-06 14:10:51 -08:00
Bimba Shrestha
f627e1a1ae
Displaying level in --show-default-cparams ( #1991 )
...
* Displaying level in --show-default-cparams
* Displaying actual enum value instead of level
2020-02-06 13:51:43 -08:00
Bimba Shrestha
075783c1f0
Merge pull request #1980 from bimbashrestha/params
...
Adding --show-default-cparams to cli
2020-02-03 14:43:55 -08:00
Bimba Shrestha
d1389ac3ff
Adding assert(NB_STRATEGIES == upperLimit)
2020-02-03 09:52:39 -08:00
Bimba Shrestha
f33baa21c6
Removing assert and changing ratio cSize
2020-01-31 11:54:14 -08:00
Bimba Shrestha
19473390d1
Adding (void)ZSTD_strategyMap
2020-01-31 10:54:02 -08:00
Bimba Shrestha
38d010eea0
Adding static assert and using it in cli
2020-01-31 10:47:17 -08:00
Bimba Shrestha
0fa6c90e89
Moving to same category as -v
2020-01-31 10:38:19 -08:00
Bimba Shrestha
f4ae6c0b94
Moving documentation and elaborating
2020-01-30 17:54:42 -08:00
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
Yann Collet
9df49dc50a
Visual compiler bug work-around
2019-11-06 15:23:44 -08:00
Yann Collet
be34969e5c
minor man page fix
2019-11-06 15:07:35 -08:00
Yann Collet
a7e33e3e10
updated fuzz tests to use FileNamesTable* abstraction
2019-11-06 14:42:13 -08:00
Yann Collet
31a0abbfda
updated pzstd and largeNbDicts to use the new FileNamesTable* abstraction
2019-11-06 09:10:05 -08:00
Yann Collet
b09f59390b
refactor code to only use FileNamesTable*
2019-11-05 17:02:43 -08:00
Yann Collet
76b9e42b0b
refactoring (simplification) of util.h public API
2019-11-05 14:59:45 -08:00
Yann Collet
81c51483e9
Merge branch 'dev' into ahmed_file
2019-11-05 14:44:12 -08:00
Yann Collet
47034cd6c3
Merge pull request #1850 from bimbashrestha/named_pipes
...
Gating named pipe support on windows
2019-10-30 12:18:58 -07:00
Shashank Tavildar
3c1649f139
Removed the optimization check
2019-10-29 15:59:20 -07:00
Shashank Tavildar
6d0b7bd6ce
Changed extension comparision logic, added new test cases
2019-10-29 13:36:09 -07:00
Shashank Tavildar
c5060997e9
Added check to perform comparison only if extension is present
2019-10-29 12:56:04 -07:00
Shashank Tavildar
9ab6a747d4
Created utility function to extract extension from filename, fixed tests
2019-10-29 12:27:54 -07:00
Bimba Shrestha
da73b11b14
Merge branch 'dev' into named_pipes
2019-10-29 01:17:13 -04:00
Shashank Tavildar
0f2bff2faf
Addressing comments, removing cyclic dependency with header file, updating tests
2019-10-28 18:21:47 -07:00
Shashank Tavildar
0e9a37daeb
Fixing tests and moving flag to advanced usage
2019-10-28 15:22:26 -07:00
Yann Collet
65f2d97f33
updated UTIL_createFileNamesTable() inline documentation
2019-10-28 15:20:40 -07:00
Shashank Tavildar
f422914619
Resolving local merge conflicts
2019-10-28 15:15:13 -07:00
Yann Collet
d9c634e13b
return final \0
directly from readLine()
2019-10-28 15:03:32 -07:00
Shashank Tavildar
02433e0b15
Addressing comments: -Created a list of extensions defined in fileio.h, -Updated test
2019-10-28 14:54:54 -07:00
Shashank Tavildar
48f856640e
Added --exclude-compressed flag feature that skips compression of precompressed files
2019-10-28 13:57:40 -07:00
Yann Collet
d7f258d845
change command name to --filelist=
...
updated documentation and man page
2019-10-28 13:54:36 -07:00
Yann Collet
a78a8759a2
Merge branch 'dev' into ahmed_file
2019-10-28 13:43:28 -07:00
Yann Collet
12efa1ed89
yet another minor visual conversion warning
...
this time for 32-bit systems
2019-10-26 00:27:32 -07:00
Yann Collet
3e5c81ea36
fixed another minor conversion warning on Visual
...
and made CONTROL() use exit() instead of abort().
2019-10-26 00:01:11 -07:00
Yann Collet
74d872e987
fix minor conversion warning on 32-bit
2019-10-25 18:26:30 -07:00
Yann Collet
b40eaced94
minor cosmetic refactoring
2019-10-25 18:16:45 -07:00
Yann Collet
5fb84ca2cf
no need to track tableBuf
...
free() is compatible with NULL,
let's free() unconditionnally
2019-10-25 17:34:29 -07:00
Yann Collet
8e414b586d
test resilience on garbage file
...
and clean traces
2019-10-25 17:01:26 -07:00
Yann Collet
1ead0c5d5a
improved --file=FILE implementation
...
pass basic tests
2019-10-25 16:36:59 -07:00
Shashank Tavildar
55ee7d56e4
Added --exclude-compressed flag feature that skips compression of precompressed files
2019-10-25 15:49:11 -07:00
Bimba Shrestha
5e59d51991
Merge branch 'master' of https://github.com/bimbashrestha/zstd into named_pipes
2019-10-25 15:43:41 -07:00
Bimba Shrestha
857268b32c
Gating named pipe support in hedaer file
2019-10-25 15:15:28 -07:00
Bimba Shrestha
0b52d878b2
Cleaning up gate and adding comment to flag
2019-10-25 14:06:50 -07:00
Bimba Shrestha
5b45ff4f1c
Gating named file support on windows
2019-10-25 11:32:38 -07:00
W. Felix Handte
4eccc82875
Minor Fixes
2019-10-25 13:59:19 -04:00
Yann Collet
14e9010bb5
Merge pull request #1844 from AhmedAbdellah19/adding_read_files_from_file_feature
...
Adding --file=FILE feature
2019-10-25 10:11:47 -07:00
W. Felix Handte
91c3f545cc
Fix Build; Refactor
2019-10-24 20:18:57 -04:00
Felix Handte
506e1a1176
Merge branch 'tzst-ext-tmp' into tzst-ext
2019-10-24 17:49:34 -04:00
Ahmed Abdellah
5249085e11
fixing free const char** filenamesTable
2019-10-24 20:54:40 +01:00
Yann Collet
37f90930da
Merge pull request #1839 from bimbashrestha/named_pipes
...
Allowing named pipes to go through in zstdcli
2019-10-24 10:53:12 -07:00
Ahmed Abdellah
5f9e868ee8
fixing type conversion error
2019-10-24 16:20:58 +01:00
Ahmed Abdellah
0b3096596a
fixing AppVeyor errors
2019-10-24 15:25:48 +01:00
Ahmed Abdellah
cddb05ef8c
fixing some warning
2019-10-24 14:42:37 +01:00
Ahmed Abdellah
5e206fdd53
fixing some warning
2019-10-24 14:21:01 +01:00
Ahmed Abdellah
0e6a73b148
fixing newTable issues and some warnings
2019-10-24 13:51:12 +01:00
Ahmed Abdellah
639bb46954
removing extra logs
2019-10-24 11:35:26 +01:00
Ahmed Abdellah
849b8c6de8
fixing continuous integeration errors and removing a lot of logs
2019-10-24 11:10:13 +01:00
Ahmed Abdellah
47712c9b15
fixing c90 issue in util.c cont.
2019-10-24 10:30:05 +01:00
Ahmed Abdellah
c799f33899
fixing c90 issue in util.c cont. again
2019-10-24 10:23:36 +01:00
Ahmed Abdellah
8a9741b3ee
fixing c90 issue in util.c cont.
2019-10-24 10:17:31 +01:00
Ahmed Abdellah
aefa18ee38
fixing c90 issue in util.c
2019-10-24 10:12:51 +01:00
Ahmed Abdellah
f43e45954f
fixing memory leak issue and removing c90 issue
2019-10-24 09:39:16 +01:00
Ahmed Abdellah
8cbe42fcb0
solving the rest of C90 issues in defining local variables in middle of code and comparing uncompatible types
2019-10-23 20:22:07 +01:00
Ahmed Abdellah
9a454e9724
solving C90 issues in defining local variables in middle of code and comparing uncompatible types
2019-10-23 20:15:18 +01:00
AhmedAbdellah19
7a732e2bb2
Merge branch 'dev' into adding_read_files_from_file_feature
2019-10-23 20:29:01 +02:00
Bimba Shrestha
8a3974807e
Allowing named pipes to go through zstdcli
2019-10-22 15:23:22 -07:00
Yann Collet
514f941a70
Merge pull request #1836 from facebook/dirFlat2
...
Added --output-dir-flat=
2019-10-22 15:19:04 -07:00
Nick Terrell
b1ec94e63c
Fix ZSTD_f_zstd1_magicless for small data
...
* Fix `ZSTD_FRAMEHEADERSIZE_PREFIX` and `ZSTD_FRAMEHEADERSIZE_MIN` to
take a `format` parameter, so it is impossible to get the wrong size.
* Fix the places that called `ZSTD_FRAMEHEADERSIZE_PREFIX` without
taking the format into account, which is now impossible by design.
* Call `ZSTD_frameHeaderSize_internal()` with `dctx->format`.
* The added tests catch both bugs in `ZSTD_decompressFrame()`.
Fixes #1813 .
2019-10-21 21:16:17 -07:00
Yann Collet
989e0f0cee
Added --output-dir-flat=
...
which is a preferred construction when applicable.
Also, added --output-dir-flat into man page.
2019-10-21 14:39:18 -07:00
Yann Collet
6cf04c0344
Merge pull request #1834 from facebook/winFix
...
Windows fixes
2019-10-21 13:45:17 -07:00
Yann Collet
632e07747c
minor refactor of FIO_compressGzFrame()
...
mostly narrowing variables lifetime and mutability.
2019-10-21 12:14:59 -07:00
Yann Collet
ca73c218be
added mode documentation on ZSTD_CLEVEL
...
providing range restriction [1-19] explicitly
partially answering #1829
2019-10-18 17:22:45 -07:00
Yann Collet
0492c57013
fixed visual defined test
2019-10-18 17:08:52 -07:00
Yann Collet
f379637025
removed Visual warning
...
for pointer casts
2019-10-18 17:05:42 -07:00
Yann Collet
1bd6c15b6b
fix function cast warning on Windows with gcc9
2019-10-18 15:45:57 -07:00
Yann Collet
58c59341d3
updated windows binary resources
2019-10-18 15:41:12 -07:00
Yann Collet
29e46ed0bd
fix test on windows
...
isDirectory() doesn't work on Windows
if directory name is followed by '/'
2019-10-18 14:28:34 -07:00
Yann Collet
ad86a5d0bc
rewrite FIO_createFilename_fromOutDir()
2019-10-18 11:15:10 -07:00
Yann Collet
caf40d0ae4
fix : no output file opened in test mode
...
also : redistributed error code within fileio.c
for more precise diagnosis.
2019-10-17 16:58:49 -07:00
Yann Collet
0a24d4ef18
removed regular file test on Windows
...
since it does not work well on this platform
(tested with MinGW).
Note : could be an issue within UTIL_isRegularFile()
2019-10-17 16:39:47 -07:00
Yann Collet
0ee360982d
improved test mode -t
...
The test mode do no longer open a file `/dev/null` nor write anything to output.
This is supposed to be more efficient than writing to `/dev/null`,
and more universal too : the previous method was failing on Windows.
2019-10-17 16:09:53 -07:00
Yann Collet
1795133c45
refactored FIO_compressMultipleFilenames() prototype
...
for consistency
2019-10-17 15:32:03 -07:00
Yann Collet
7f86ae2867
fixed multiple implicit casts
2019-10-17 15:27:25 -07:00
Yann Collet
157479af0c
fixed isSameFile()
2019-10-17 14:31:42 -07:00
Yann Collet
a71256a2ee
fix several cast
2019-10-17 11:01:20 -07:00
Yann Collet
000404311f
fix incorrect dictName/FileName comparison on Windows
...
inode identification does not seem to work on Windows,
even with on a msys2 posix layer.
2019-10-17 10:56:14 -07:00
Yann Collet
19741c7d99
Merge pull request #1815 from facebook/zlibwrap
...
make zlibWrapper strict ISO-C90 compatible
2019-10-16 16:45:15 -07:00
Yann Collet
6309be677c
minor comments & refactoring
2019-10-15 16:09:18 -07:00
Ahmed Abdellah
779ea72953
Adding --file=FILE feature
2019-10-15 07:49:13 +01:00
Yann Collet
8b6d96827c
Merge pull request #1731 from chungy/stdin_nochmod
...
[programs] don’t do chmod when coming from stdin or multiple files
2019-10-14 09:34:56 -07:00
Yann Collet
b3e92ad346
Merge pull request #1812 from senhuang42/output-dir-flat
...
Support for --output-dir-flat: output into a directory
2019-10-14 09:25:05 -07:00
Eric van Gyzen
46ee10dfb5
Include errno in all fwrite error messages in fileio.c
2019-10-10 09:21:29 -05:00
Sen Huang
c5ebb37051
Only check for filename collisions when using --output-dir-flat
2019-10-09 09:39:52 -04:00
Sen Huang
6e406b55ee
Casting to void* to avoid C4090 warnings
2019-10-08 09:54:59 -04:00
Sen Huang
332b5988d8
Suppress C4090 warning
2019-10-08 09:44:24 -04:00
Sen Huang
f9b1da6f62
Hopefully fix VS compiler warning
2019-10-08 00:15:28 -04:00
Yann Collet
e0d413d648
fixed init warning
2019-10-04 15:09:52 -07:00
Sen Huang
6b81bfb257
Changed function name, fix test
2019-10-03 15:23:49 -04:00
Sen Huang
64bc441d7d
Now constructs final destination path without allocating new table
2019-10-03 13:53:04 -04:00
Sen Huang
4dc604cab8
Addressed comments on malloc
2019-10-02 18:34:42 -04:00
Sen Huang
c763457e0a
Static analyze fix
2019-10-02 15:30:24 -04:00
Sen Huang
b93f1b2a30
CI Tests fix
2019-10-02 11:29:34 -04:00
Sen Huang
147b761454
Removed strdup() dependency
2019-10-02 11:18:14 -04:00
Sen Huang
1e4d602412
Modified message
2019-10-02 11:11:35 -04:00
Sen Huang
f80437c586
Add support for --output-dir-flat
...
New flag to specify output directory destination for multiple files.
2019-10-02 11:08:20 -04:00
Yann Collet
ad2a2785f7
bump version number to v1.4.4
...
so that future reports on `dev` branch use this number instead
2019-09-24 15:15:33 -07:00
Sergey Ponomarev
dafe796e39
#1790 short tar's extensions tgz, txz, tlz4m .tzst should be decompressed with .tar suffix
2019-09-18 09:23:10 +03:00
Sergey Ponomarev
bfb4d830b2
FIO_determineDstName: extract dstFileNameEndPos variable
2019-09-18 09:21:00 +03:00
Sergey Ponomarev
59f369a6da
Add short tar's extensions .tgz (.tar.gz), .txz (.tar.xz), .tzst (.tar.zst)
2019-09-14 21:30:15 +03:00
Sergey Ponomarev
a101721f4e
Use one strstr() call instead of chain of strcmp()
2019-09-14 21:26:27 +03:00
Sergey Ponomarev
7d9cd22e21
#754 Add a hint about -o option
2019-09-14 21:23:47 +03:00
Sergey Ponomarev
8cc815a941
#754 sufixlist->SUFFIX_LIST
2019-09-14 21:15:24 +03:00
Sergey Ponomarev
b804dd3e5b
#754 move sufixlist upper and improve error message on missing suffix
2019-09-14 21:14:43 +03:00
W. Felix Handte
e1ec8004cc
Formatting and Clean Up
2019-09-12 16:27:05 -04:00
W. Felix Handte
5a9baae9cf
Set M-Time Nanoseconds
2019-09-12 11:50:33 -04:00
Felix Handte
6ae1ec96bc
Merge pull request #1708 from neheb/dev
...
zstd: Don't use utime on Linux
2019-09-12 11:44:31 -04:00
Yann Collet
41416f0927
Merge pull request #1773 from bimbashrestha/rle_first_block_decompression_fix
...
Removing redundant condition in decompression, making first block rle…
2019-09-10 11:17:29 -07:00
Sen Huang
62616c4d90
fixes for windows compilation
2019-09-06 13:20:50 -07:00
Sen Huang
30bff50e06
fixes for tests and segfault
2019-09-06 11:10:53 -07:00
Bimba Shrestha
d687d603e4
Removing redundant condition in decompression, making first block rles valid to deocmpress
2019-09-06 10:46:19 -07:00
Sen Huang
a9c807a948
kill memory leaks, cleanup, fix some dumb bugs
2019-09-06 10:17:04 -07:00
Sen Huang
6beb3c0159
added decompression support
2019-09-05 17:56:24 -07:00
Sen Huang
7f98b46876
adding support for -O flag: multiple files into one directory for compressions (decompression to come)
2019-09-05 16:03:35 -07:00
Mike Swanson
25878b2de9
[programs] don’t do chmod when coming from stdin or multiple files
...
Fixes #1729
2019-09-02 18:02:32 -07:00
Nick Magerko
493f95c7df
Fix merge conflicts
2019-08-22 11:51:41 -07:00
Nick Terrell
a505463710
Merge pull request #1726 from nmagerko/stream-size
...
Add --stream-size=# option
2019-08-22 11:31:15 -07:00
Nick Magerko
fd486a846a
Differentiate --stream-size from --size-hint
2019-08-22 09:37:47 -07:00
Nick Magerko
2cdda8b3c4
Minor documentation update
2019-08-22 09:13:28 -07:00
Nick Magerko
05d7479a50
Document --size-hint
2019-08-20 14:08:26 -07:00
Nick Magerko
2d39b43906
Use int for srcSizeHint when sensible
2019-08-19 16:49:25 -07:00
Nick Magerko
dffbac5f89
Add --size-hint=# option
2019-08-19 11:38:49 -07:00
Nick Magerko
30bfa228e8
Keep content size flag set in stream size mode
2019-08-19 11:20:28 -07:00
Nick Magerko
a24dc3a935
Remove extraneous variables
2019-08-19 11:14:56 -07:00
Nick Magerko
f781cf672b
Remove extraneous parameter
2019-08-19 11:07:43 -07:00
Nick Magerko
bbd83c2ab3
Update man page
2019-08-19 09:11:22 -07:00
Nick Magerko
c403b12f9d
Set pledged size just before compression
2019-08-19 09:01:31 -07:00
Nick Magerko
af0c9501d1
Add --stream-size=# command
2019-08-16 11:34:39 -07:00
Ed Maste
b81d7cc6a0
remove extraneous doubled ;s
2019-08-15 21:17:06 -04:00
Yann Collet
01b2331ad1
bumped version number
...
to v1.4.3
2019-08-05 17:17:16 +02:00
Yann Collet
26351071bc
Merge pull request #1706 from LeeYoung624/dev
...
add NULL pointer check in util.c
2019-08-05 15:56:50 +02:00
Yann Collet
387e20d4f0
fixed minor conversion warning in datagen
2019-08-02 18:02:54 +02:00
Yann Collet
37f47e51a8
fixed datagen
...
to produce same content on both 32 and 64-bit platforms
by removing floating from literal table determination.
also : added checksum trace in compression control test,
so that it's easier to determine if test fails
as a consequence of compressing a different sample.
2019-08-02 17:34:53 +02:00
Rosen Penev
41e90653fe
zstd: Don't use utime on Linux
...
utime is deprecated by POSIX 2008 and optionally not available with
uClibc-ng.
Got rid of a few useless headers in timefn.h.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-07-31 12:29:13 -07:00
LeeYoung624
c5caaf52a4
bug fix : NULL pointer
2019-07-29 17:05:50 +08:00
LeeYoung624
793b94b354
memory leak fix
2019-07-25 21:07:57 +08:00
Yann Collet
1f16245e9e
updated man page
2019-07-24 16:04:37 -07:00
Yann Collet
0d38ee3c30
Merge pull request #1690 from piguin/dev
...
fix compiling errors with clang-8
2019-07-24 15:37:05 -07:00
Tyler Tran
5a61e66f7b
previous commit did not undo all changes
2019-07-24 13:53:50 -07:00
Tyler Tran
12d60a9bd9
removing changes to zstd.1
2019-07-24 13:52:34 -07:00
Tyler Tran
f8c1d7979c
modifying minor nit
2019-07-22 16:36:44 -07:00
Tyler Tran
02da4497f0
Adding documentation for shrink flag PR #1656
2019-07-22 16:33:22 -07:00
Qin Li
04a9d6b828
fix compiling errors with clang-8
...
Compiling with clang-8 fails with the following errors:
largeNbDicts.c:562:37: error: implicit conversion turns floating-point
number into integer: 'const double' to 'U64' (aka 'unsigned long')
[-Werror,-Wfloat-conversion]
U64 const dTime_ns = result.nanoSecPerRun;
~~~~~~~~ ~~~~~~~^~~~~~~~~~~~~
zstdcli.c:300:5: error: '@return' command used in a comment that is
not attached to a function or method declaration
[-Werror,-Wdocumentation]
* @return 1 means that cover parameters were correct
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
zstdcli.c:301:5: error: '@return' command used in a comment that is
not attached to a function or method declaration
[-Werror,-Wdocumentation]
* @return 0 in case of malformed parameters
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-07-18 19:41:00 -07:00
Yann Collet
8eda16c9f6
Merge pull request #1677 from LeeYoung624/gitignore_fix
...
fix gitignore errors
2019-07-09 14:36:38 -07:00
Yann Collet
b8ec4b0fd6
updated version number (to v1.4.1)
...
also : added doc on context re-use, as suggested by @scherepanov at #1676
2019-07-09 11:43:59 -07:00
LeeYoung624
654cb9d439
fix gitignore errors
2019-07-09 21:08:13 +08:00
Yann Collet
096714d1b8
Merge pull request #1671 from ephiepark/dev
...
Adding targetCBlockSize param
2019-07-03 17:47:44 -07:00
Ephraim Park
9007701670
Adding targetCBlockSize param
2019-07-03 15:41:52 -07:00
Yann Collet
857e608b51
Merge pull request #1658 from facebook/memset
...
memset() rather than reduceIndex()
2019-07-01 15:01:43 -07:00
Tyler-Tran
c55d2e7ba3
Adding shrinking flag for cover and fastcover ( #1656 )
...
* Changed ERROR(GENERIC) excluding inits
* editing git ignore
* Edited init functions to size_t returns
* moved declarations earlier
* resolved issues with changes to init functions
* fixed style and an error check
* attempting to add tests that might trigger changes
* added && die to cases expecting to fail
* resolved no die on expected failed command
* fixed accel to be incorrect value
* Adding an automated shrinking option
* Fixing build
* finalizing fixes
* fix?
* Removing added comment in cover.h
* Styling fixes
* Merging with fb dev
* removing megic number for default regression
* Requested revisions
* fixing support for fast cover
* fixing casting errors
* parenthesis fix
* fixing some build nits
* resolving travis ci syntax
* might resolve all compilation issues
* removed unused variable
* remodeling the selectDict function
* fixing bad memory access
* fixing error checks
* fixed erroring check in selectDict
* fixing mixed declarations
* modify mixed declaration
* fixing nits and adding test cases
* Adding requested changes + fixed bug for error checking
* switched double comparison from != to <
* fixed declaration typing
* refactoring COVER_best_finish() and changing shrinkDict
* removing the const's
* modifying ZDICT_optimizeTrainFromBuffer_cover functions
* fixing potential bad memcpy
* fixing the error function for dict size
2019-06-27 16:26:57 -07:00
Yann Collet
944e2e9e12
benchfn : added macro macro CONTROL()
...
like assert() but cannot be disabled.
proper separation of user contract errors (CONTROL())
and invariant verification (assert()).
2019-06-21 15:58:55 -07:00
Yann Collet
1166782eb7
Merge pull request #1640 from felixhandte/lstat-macro-guard
...
Protect lstat() With Better Macro Guard
2019-06-14 17:30:03 -07:00
Mike Swanson
af80f6dfac
[programs] Don’t try to chmod a dst file if it can’t be opened
...
Repairs an oversight in my last commit, thanks @Cyan4973
2019-06-09 01:52:45 -07:00
Mike Swanson
3968160a91
[programs] set chmod 600 after opening destination file
...
This resolves a race condition where zstd or unzstd may expose read
permissions beyond the original file allowed. Mode 600 is used
temporarily during the compression and decompression write stage
and the new file inherits the original file’s mode at the end.
Fixes #1630
2019-06-08 21:54:02 -07:00
W. Felix Handte
d2c48042e6
Switch Macro Guarding lstat()
2019-06-07 15:32:28 -04:00
Yosuke Tanigawa
f46a3603c9
Update README.md
...
Fix minor typo in the documentation.
2019-06-05 09:11:21 -07:00
Ephraim Park
e498bb64b6
zstdcli : align output message with previous message
2019-06-04 09:42:18 -07:00
Ephraim Park
a38601f05a
zstdcli : remove extra semicolon
2019-06-04 09:25:16 -07:00
Ephraim Park
ef2c836955
zstdcli : trying to fix declaration after statement
2019-06-04 09:23:49 -07:00
Ephraim Park
5fe974261b
zstdcli : moving cpu load calculation from FIO_compressFilename_dstFile to FIO_compressFilename_internal
2019-06-04 09:04:35 -07:00
Ephraim Park
2841c79e87
zstdcli : fixing mixed declarations and code error
2019-06-03 17:36:09 -07:00
Ephraim Park
43d463eccb
zstdcli : moving start time and cpu initialization after potential prompt
2019-06-03 17:31:14 -07:00
Ephraim Park
5029ebce2f
zstdcli : exposing cpu load indicator for each file on -vv mode
2019-06-03 14:38:40 -07:00
W. Felix Handte
61025d5b7d
zstdgrep: Handle -f Flag
2019-05-24 16:55:59 -04:00
Rosen Penev
23b5ee1236
fileio: Disable BACKTRACE under uClibc
...
uClibc does not support BACKTRACE. It also defines __GLIBC__ and minor as both 2.
This fixes compilation under such a setup.
2019-05-06 15:02:47 -07:00
cev
c4a40dbf65
set followLinks option true to cat, zcat and gzcat programs
2019-04-27 19:06:29 -04:00
myzhang1029
f837326f11
Fix #1591 - Not building on MinGW-W64
...
Add a static function LONG_TELL for the forth #if branch
2019-04-24 20:06:05 +08:00
Josh Soref
a880ca239b
Spelling ( #1582 )
...
* spelling: accidentally
* spelling: across
* spelling: additionally
* spelling: addresses
* spelling: appropriate
* spelling: assumed
* spelling: available
* spelling: builder
* spelling: capacity
* spelling: compiler
* spelling: compressibility
* spelling: compressor
* spelling: compression
* spelling: contract
* spelling: convenience
* spelling: decompress
* spelling: description
* spelling: deflate
* spelling: deterministically
* spelling: dictionary
* spelling: display
* spelling: eliminate
* spelling: preemptively
* spelling: exclude
* spelling: failure
* spelling: independence
* spelling: independent
* spelling: intentionally
* spelling: matching
* spelling: maximum
* spelling: meaning
* spelling: mishandled
* spelling: memory
* spelling: occasionally
* spelling: occurrence
* spelling: official
* spelling: offsets
* spelling: original
* spelling: output
* spelling: overflow
* spelling: overridden
* spelling: parameter
* spelling: performance
* spelling: probability
* spelling: receives
* spelling: redundant
* spelling: recompression
* spelling: resources
* spelling: sanity
* spelling: segment
* spelling: series
* spelling: specified
* spelling: specify
* spelling: subtracted
* spelling: successful
* spelling: return
* spelling: translation
* spelling: update
* spelling: unrelated
* spelling: useless
* spelling: variables
* spelling: variety
* spelling: verbatim
* spelling: verification
* spelling: visited
* spelling: warming
* spelling: workers
* spelling: with
2019-04-12 11:18:11 -07:00
Yann Collet
1e01560b83
fixed timespec_get() initialization bug on some targets
...
not sure why, but msan fires an "unitialized variable" error
when time gets properly initialized by timespec_get().
Maybe in some cases, not all bytes of the structure are initialized ?
Or maybe msan fails to detect the initialization ?
Anyway, pre-initializing the variable before passing it to timespec_get() works.
2019-04-11 13:46:30 -07:00
Yann Collet
30c26ab726
fixed minor warning
...
unused variable when assert() turned off in fileio.c
2019-04-10 17:48:56 -07:00
Yann Collet
fbdd30d68e
fixed cmake build script for test programs
2019-04-10 17:47:01 -07:00
Yann Collet
526ec646b7
alternate static assert
...
to circumvent Visual's C4804 warning
2019-04-10 16:05:02 -07:00
Yann Collet
9703a59121
fixed minor conversion warning
2019-04-10 15:54:55 -07:00
Yann Collet
885476fb5b
FreeBSD_11 specific fix
...
C11 mandates the definition of timespec_get() and TIME_UTC.
However, FreeBSD11 announce C11 compliance, but does not provifr timespec_get(),
breaking link stage for benchfn.
Since it does not provide TIME_UTC either, which is also required by C11,
test this macro: this will automatically rule out FreeBSD 11 for this code path
(it will use the backup C90 path instead, based on clock_t).
The issue seeems fixed in FreeBSD 12.
2019-04-10 15:22:18 -07:00
Yann Collet
2c6b14ed22
fixed Windows header
...
cmake build script: added timefn
2019-04-10 14:54:13 -07:00
Yann Collet
3d346579d8
no more need for CLOCK_MONOTONIC
2019-04-10 14:16:39 -07:00
Yann Collet
36d2dfd846
moved C11 code path to timespec_get
2019-04-10 14:15:11 -07:00
Yann Collet
4765929271
fixed perror include
2019-04-10 14:04:11 -07:00
Yann Collet
70802cde6d
fixed error message
...
using stdlib's perror()
2019-04-10 14:01:18 -07:00
Yann Collet
4b8185c7fc
tried a blindfix for unix + c11
2019-04-10 13:26:27 -07:00
Yann Collet
59a7116cc2
benchfn dependencies reduced to only timefn
...
benchfn used to rely on mem.h, and util,
which in turn relied on platform.h.
Using benchfn outside of zstd required to bring all these dependencies.
Now, dependency is reduced to timefn only.
This required to create a separate timefn from util,
and rewrite benchfn and timefn to no longer need mem.h.
Separating timefn from util has a wide effect accross the code base,
as usage of time functions is widespread.
A lot of build scripts had to be updated to also include timefn.
2019-04-10 12:37:03 -07:00
Yann Collet
094c000904
Merge branch 'dev' into benchfn
2019-04-10 11:57:05 -07:00
Yann Collet
90c0462d63
minor presentation refactoring
...
and removed some // comment style
2019-04-10 10:03:06 -07:00
Ori Peleg
bdeb4786b5
Fixed -r
typo
2019-04-10 13:37:41 +03:00
shakeelrao
dca73db30c
fix srcSize typo and add new UTIL func to comment
2019-03-28 17:50:34 -07:00
shakeelrao
5333e41ab3
Add NULL check for dict
2019-03-24 00:23:50 -07:00
shakeelrao
8ea219d8c6
Modify error msg
2019-03-23 21:59:30 -07:00
shakeelrao
1290933d19
Implement file check
2019-03-23 21:53:13 -07:00
shakeelrao
e5811e5520
Extract file comparison into utility func
2019-03-23 19:04:56 -07:00
Nick Terrell
19ca3fbc03
[zstdcli] Respect --[no-]compress-literals in benchmark mode
2019-02-15 16:27:39 -08:00
Nick Terrell
0c53c5ad4a
[zstdcli] Add a flag to control literals compression
2019-02-15 15:00:45 -08:00
Nick Terrell
e1a799e5de
[util] Fix UTIL_isLink() for FreeBSD
2019-02-11 17:44:10 -08:00
Björn Ketelaars
482b84f07b
Make detection of symbolic links more consistent
...
While fixing the detection of symbolic links on OpenBSD I noticed
inconsistent behaviour:
$ echo hello > hello
$ ln -s hello world
$ zstd hello world
Warning : world is a symbolic link, ignoring
hello :316.67% ( 6 => 19 bytes, hello.zst
$ ls *.zst
hello.zst
$ zstd world
world :316.67% ( 6 => 19 bytes, world.zst)
$ ls *.zst
hello.zst world.zst
2019-02-12 01:56:05 +01:00
Björn Ketelaars
1e4dc2e5f1
Detect symbolic links on OpenBSD
...
In #1520 it is described that FreeBSD doesn't detect symbolic links. The
same is true for OpenBSD. This diff fixes this issue for OpenBSD. I'm
guessing that something similar works for FreeBSD as well. However, I'm
unable to test this.
2019-02-12 01:56:05 +01:00
Peter (Stig) Edwards
1951c1b3a0
-Wformat-security not needed with -Wformat=2
2019-02-01 09:31:46 +00:00
Yann Collet
fb756156f5
fixed static size of benchFnState
...
added a static assert to ensure condition is respected on target platform
2019-01-30 17:59:07 -08:00
Yann Collet
b8701102e0
fixed benchzstd to use new version of benchfn
...
returning a double type
2019-01-25 15:11:50 -08:00
Yann Collet
8c3ba44ada
Merge branch 'fileio_lz4' into benchfn
2019-01-25 14:53:56 -08:00
Yann Collet
07e047873e
fixed fileio.c compilation with LZ4 enabled
...
was broken by #1505 .
I'm surprised it passed CI tests.
LZ4 tests are part of the "Extended" tests on Travis CI,
which are run on "master" and in "cron" jobs.
Since latest cron job did not failed,
especially this one : https://travis-ci.org/facebook/zstd/jobs/484365040
it suggests cron jobs are no longer using `dev` branch.
To be investigated
2019-01-25 14:42:44 -08:00
Yann Collet
f75ad2edcf
added ability to create timedFnState on stack
2019-01-25 14:22:25 -08:00
Yann Collet
6b2f26791e
updated benchfn.h code comments
2019-01-25 12:18:33 -08:00
Karl Ostmo
5e220bf4b5
Remove global parameters, pass into public functions instead
2019-01-23 16:06:27 -08:00
Karl Ostmo
4fa585aee3
fix --list on truncated files
...
fseek() doesn't indicate when it moves past the end of a file.
Consequently, if a file is truncated within its last block, the error would't be detected.
This PR adds a test scenario that induces this situation using a small compressed file of only one block in size.
This test is added to tests/playTests.sh
Check is implemented by ensuring that the filehandle position is equal to the filesize upon exit.
2019-01-15 19:03:29 -08:00
Lzu Tao
7b6a8840c5
Fix #1428 - zstdgrep returned 1 on match and unmatch
...
- Use ZCAT for testing zstdgrep in case of non-install yet
- tests: Add file test for zstdgrep
2019-01-06 23:22:55 +07:00
Conrad Meyer
fe82637069
Fix #1425 - Use physical core count API on FreeBSD
...
Similar to Apple, use the native physical core count sysctl, when available.
This is a little repetitive (it's basically the __APPLE__ method plus the
otherBSD method concatenated together) but seemed clearer than any way that
would totally eliminate repetition.
The __FreeBSD_version check only tests the version of the FreeBSD kernel
that zstd is compiled on; importantly, it may be run on a different version.
So the compile-time check is a little naive and needs to be able to fallback
to work on older versions of FreeBSD. For a similar reason, it may make
sense to simply eliminate the __FreeBSD_version check entirely. The
tradeoff is that a spurious sysctlbyname would be issued when -T0 is used on
older kernels.
2019-01-04 11:57:12 -08:00
Yann Collet
6b7a1d6127
fixed detection of input==output on Visual
...
due to bad support of inode identifiers.
On Visual, option is limited to same file name,
which is imperfect, but way better than disabling the feature entirely.
It's enough to pass associated tests.
2018-12-26 15:51:34 -08:00
Yann Collet
ae1d6bd48e
fixed playTests.sh for minGW
...
On Windows, the equivalent of `/dev/null` is `NUL`.
When tests are run under msys2/minGW,
the environment identifies itself as Windows,
hence the script uses `NUL` instead of `/dev/null`
but the environment will consider `NUL` to be a regular file name.
Consequently, `NUL` will be overwritten during tests,
triggering an error.
This patch uses flag `-f` to force such overwrite
passing the test.
2018-12-26 15:19:09 -08:00
Yann Collet
1fdba696ca
fixed VS2008 project
...
bench.c => benchfn.c + benchzstd.c
wrong util.c from prior patch
and warnings :
C4127
2018-12-25 16:14:14 -08:00
Yann Collet
ededcfca57
fix confusion between unsigned <-> U32
...
as suggested in #1441 .
generally U32 and unsigned are the same thing,
except when they are not ...
case : 32-bit compilation for MIPS (uint32_t == unsigned long)
A vast majority of transformation consists in transforming U32 into unsigned.
In rare cases, it's the other way around (typically for internal code, such as seeds).
Among a few issues this patches solves :
- some parameters were declared with type `unsigned` in *.h,
but with type `U32` in their implementation *.c .
- some parameters have type unsigned*,
but the caller user a pointer to U32 instead.
These fixes are useful.
However, the bulk of changes is about %u formating,
which requires unsigned type,
but generally receives U32 values instead,
often just for brevity (U32 is shorter than unsigned).
These changes are generally minor, or even annoying.
As a consequence, the amount of code changed is larger than I would expect for such a patch.
Testing is also a pain :
it requires manually modifying `mem.h`,
in order to lie about `U32`
and force it to be an `unsigned long` typically.
On a 64-bit system, this will break the equivalence unsigned == U32.
Unfortunately, it will also break a few static_assert(), controlling structure sizes.
So it also requires modifying `debug.h` to make `static_assert()` a noop.
And then reverting these changes.
So it's inconvenient, and as a consequence,
this property is currently not checked during CI tests.
Therefore, these problems can emerge again in the future.
I wonder if it is worth ensuring proper distinction of U32 != unsigned in CI tests.
It's another restriction for coding, adding more frustration during merge tests,
since most platforms don't need this distinction (hence contributor will not see it),
and while this can matter in theory, the number of platforms impacted seems minimal.
Thoughts ?
2018-12-21 18:09:41 -08:00
Yann Collet
8f35c7f94c
Merge pull request #1466 from facebook/noDictPresent
...
fixed : better error message
2018-12-20 19:01:27 -08:00
Yann Collet
18434d76b8
added strerror in comment
...
as suggested by @felixhandte
2018-12-20 17:27:08 -08:00
Yann Collet
41b45b84a1
Merge pull request #1465 from facebook/noFilePresent
...
fixed : detection of non-existing file
2018-12-20 17:21:04 -08:00
Yann Collet
ed2fb6bd57
fixed : better error message when dictionary missing
...
during benchmark.
Also : refactored ZSTD_fillHashTable(),
just for readability (it does the same thing)
2018-12-20 17:20:07 -08:00
Yann Collet
6e9512a70c
Merge pull request #1463 from yijinfb/getenv
...
Add support for environment variable ZSTD_CLEVEL in CLI
2018-12-20 15:17:00 -08:00
Yann Collet
0ed8ee4a37
fixed wrong assert condition
2018-12-20 14:46:23 -08:00
Yann Collet
ffba142406
fixed file identity detection in 32-bit mode
...
also :
some library decided to use `index` as a global variable declared in standard header
shadowing the ones used in fastcover.c :(
2018-12-20 14:30:30 -08:00
Yann Collet
65a441a8f0
fixed stdlib implementation of time functions
...
generated redefinitions
2018-12-20 14:02:50 -08:00
Yann Collet
72dbf1bcd0
removed strncpy() from util.c
...
as Visual surprisingly complains about their usage.
Replaced by memcpy()
2018-12-20 12:27:12 -08:00
Yann Collet
105fa953cb
use strerror() to generate error message
...
as suggested by @terrelln .
also:
- hopefully fixed Windows version
- changed the test, so that it passes on non-english OS stdlib errors.
2018-12-20 09:16:40 -08:00
Yi Jin
9b2d708850
change function name: _readU32FromChar() -> readU32FromCharChecked()
2018-12-19 23:41:18 -08:00
Yann Collet
173ef9dea2
fixed : detection of non-existing file
...
better error message
with test
2018-12-19 18:30:57 -08:00
Yi Jin
f7b1841b6f
make init_cLevel(...) static
2018-12-19 17:56:45 -08:00
Yi Jin
30ffc24ad7
fix the code ahead of declaration issue
2018-12-19 17:49:04 -08:00
Yi Jin
0700335f57
change int init_cLevel() to int init_cLevel(void)
2018-12-19 17:38:28 -08:00
Yann Collet
0f2d443e10
added system error strings
...
to more failure cases in fileio.c
as requested by fbpkg
2018-12-19 17:25:58 -08:00
Yi Jin
cdc7bbf8b2
edit README.md
2018-12-19 17:09:54 -08:00
Yi Jin
29c7d82390
add a section on restricted support of environment variables to README.md
2018-12-19 17:06:56 -08:00
Yi Jin
26a9ae3f5f
refactor readU32FromChar(...), improve init_cLevel(...), and add env var ZSTD_CLEVEL tests
2018-12-19 16:45:42 -08:00
Yi Jin
5324b1e386
add support for setting compression level through environment variable ZSTD_CLEVEL
2018-12-19 13:26:27 -08:00
Nick Terrell
7abd6acebf
Also compare device thanks to @felixhandte
2018-12-18 15:40:27 -08:00
Nick Terrell
cd2c8defad
[zstdcli] Refuse to overwrite input file
...
Compare the input and output files by their inode number and
refuse to open the output file if the input file is the same.
This doesn't work when (de)compressing multiple files to a single
file, but that is a very uncommon use case, mostly used for
benchmarking by me.
Fixes #1422 .
2018-12-18 15:29:54 -08:00
Yann Collet
517d8c984c
Merge pull request #1449 from facebook/ovlog_def
...
overlapLog default values
2018-12-18 09:45:53 -08:00
Nick Terrell
bdfcaecc0a
[zstdcli] Add --no-progress flag
...
The `--no-progress` flag disables zstd's progress bars, but leaves
the summary.
I've added simple tests to `playTests.sh` to make sure the parsing
works.
2018-12-14 11:50:25 -08:00
Yann Collet
1993f5d412
fixed ovlog tests
...
and updated man page
2018-12-12 21:09:14 -08:00
Yann Collet
f2f86d369b
Merge branch 'btultra2' into ovlog_def
2018-12-12 20:58:14 -08:00
Yann Collet
9792acda3b
Merge branch 'dev' into btultra2
2018-12-12 20:18:27 -08:00
Yann Collet
c313a85ee2
removed exception code for overlapLog level 22
...
CLI used to set overlapLog at value 9 when level == 22.
This is no longer necessary (handled internally within library)
2018-12-11 18:13:06 -08:00