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
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
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
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
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
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
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
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
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
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
Bimba Shrestha
8a3974807e
Allowing named pipes to go through zstdcli
2019-10-22 15:23:22 -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
632e07747c
minor refactor of FIO_compressGzFrame()
...
mostly narrowing variables lifetime and mutability.
2019-10-21 12:14:59 -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
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
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
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
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
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
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