]> git.ipfire.org Git - thirdparty/zstd.git/log
thirdparty/zstd.git
5 years agosupport for verbose make 2114/head
Yann Collet [Thu, 7 May 2020 14:59:56 +0000 (07:59 -0700)] 
support for verbose make

A commonly accepted makefile idiom is V=1 or VERBOSE=1
to request the printing of all commands.

This is not "default" though, and must be manually added.

Example :
Before :
```
make libzstd
compiling dynamic library 1.4.5
creating versioned links

make libzstd V=1
compiling dynamic library 1.4.5
creating versioned links
```

After :
```
make libzstd
compiling dynamic library 1.4.5
creating versioned links

make libzstd V=1
compiling dynamic library 1.4.5
cc -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=5 -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings -Wredundant-decls -Wmissing-prototypes -Wc++-compat  -O3 common/debug.c common/entropy_common.c common/error_private.c common/fse_decompress.c common/pool.c common/threading.c common/xxhash.c common/zstd_common.c compress/fse_compress.c compress/hist.c compress/huf_compress.c compress/zstd_compress.c compress/zstd_compress_literals.c compress/zstd_compress_sequences.c compress/zstd_compress_superblock.c compress/zstd_double_fast.c compress/zstd_fast.c compress/zstd_lazy.c compress/zstd_ldm.c compress/zstd_opt.c compress/zstdmt_compress.c decompress/huf_decompress.c decompress/zstd_ddict.c decompress/zstd_decompress.c decompress/zstd_decompress_block.c deprecated/zbuff_common.c deprecated/zbuff_compress.c deprecated/zbuff_decompress.c dictBuilder/cover.c dictBuilder/divsufsort.c dictBuilder/fastcover.c dictBuilder/zdict.c legacy/zstd_v05.c legacy/zstd_v06.c legacy/zstd_v07.c -shared -fPIC -fvisibility=hidden -Wl,-soname=libzstd.so.1 -o libzstd.so.1.4.5
creating versioned links
ln -sf libzstd.so.1.4.5 libzstd.so.1
ln -sf libzstd.so.1.4.5 libzstd.so
```

5 years ago[lib] Fix NULL pointer dereference
Nick Terrell [Fri, 1 May 2020 23:35:35 +0000 (16:35 -0700)] 
[lib] Fix NULL pointer dereference

When the output buffer is `NULL` with size 0, but the frame content size
is non-zero, we will write to the NULL pointer because our bounds check
underflowed.

This was exposed by a recent PR that allowed an empty frame into the
single-pass shortcut in streaming mode.

* Fix the bug.
* Fix another NULL dereference in zstd-v1.
* Overflow checks in 32-bit mode.
* Add a dedicated test.
* Expose the bug in the dedicated simple_decompress fuzzer.
* Switch all mallocs in fuzzers to return NULL for size=0.
* Fix a new timeout in a fuzzer.

Neither clang nor gcc show a decompression speed regression on x86-64.
On x86-32 clang is slightly positive and gcc loses 2.5% of speed.

Credit to OSS-Fuzz.

5 years agoMerge pull request #2103 from felixhandte/relative-includes
Felix Handte [Wed, 6 May 2020 16:42:23 +0000 (09:42 -0700)] 
Merge pull request #2103 from felixhandte/relative-includes

Migrate Includes to Relative Paths

5 years agoMerge pull request #2095 from bimbashrestha/grep
Bimba Shrestha [Wed, 6 May 2020 16:18:15 +0000 (11:18 -0500)] 
Merge pull request #2095 from bimbashrestha/grep

[bugs] zstdgrep/grep inconsistencies

5 years agoMerge pull request #2109 from facebook/fasterCygwin
Yann Collet [Wed, 6 May 2020 03:50:40 +0000 (20:50 -0700)] 
Merge pull request #2109 from facebook/fasterCygwin

faster cygwin test

5 years agoadding tests back 2095/head
Bimba Shrestha [Tue, 5 May 2020 23:51:06 +0000 (16:51 -0700)] 
adding tests back

5 years agoMerge pull request #2108 from facebook/hufc_wconv
Yann Collet [Tue, 5 May 2020 23:38:17 +0000 (16:38 -0700)] 
Merge pull request #2108 from facebook/hufc_wconv

some more conversion fixes …

5 years agofaster cygwin test 2109/head
Yann Collet [Tue, 5 May 2020 21:08:35 +0000 (14:08 -0700)] 
faster cygwin test

The cygwin test on Appveyor is way too long (>30 mn).
The main issue is the very long zstreamtest, because no time out has been programmed.
Ensures that both fuzzer and zstreamtest receive a 30sec slot.
Should reduce cygwin tests duration by -30mn.

5 years agoYay It Works, Clean Up Logging A Bit 2103/head
W. Felix Handte [Tue, 5 May 2020 19:25:18 +0000 (15:25 -0400)] 
Yay It Works, Clean Up Logging A Bit

5 years agoFix Sed Regex Escaping for Extended Regex Rules......
W. Felix Handte [Tue, 5 May 2020 18:54:04 +0000 (14:54 -0400)] 
Fix Sed Regex Escaping for Extended Regex Rules......

5 years agoUhhh It's Still Failing, Let's Try Printing Debug Info?
W. Felix Handte [Tue, 5 May 2020 17:58:22 +0000 (13:58 -0400)] 
Uhhh It's Still Failing, Let's Try Printing Debug Info?

5 years agoMerge branch 'dev' into hufc_wconv 2108/head
Yann Collet [Tue, 5 May 2020 17:23:00 +0000 (10:23 -0700)] 
Merge branch 'dev' into hufc_wconv

5 years agoFix Fallbacks to Work on FreeBSD
W. Felix Handte [Tue, 5 May 2020 17:18:45 +0000 (13:18 -0400)] 
Fix Fallbacks to Work on FreeBSD

5 years agosome more conversion warnings
Yann Collet [Tue, 5 May 2020 17:16:59 +0000 (10:16 -0700)] 
some more conversion warnings

hunting down some static analyzer warnings

5 years agoadding help text
Bimba Shrestha [Tue, 5 May 2020 17:03:57 +0000 (10:03 -0700)] 
adding help text

5 years agofixing inconsistencies
Bimba Shrestha [Tue, 5 May 2020 16:51:44 +0000 (09:51 -0700)] 
fixing inconsistencies

5 years agofix minor conversion warnings (#2106)
Yann Collet [Tue, 5 May 2020 16:08:05 +0000 (09:08 -0700)] 
fix minor conversion warnings (#2106)

5 years agoAdd Fallback When realpath Doesn't Support --relative-to
W. Felix Handte [Mon, 4 May 2020 22:59:47 +0000 (18:59 -0400)] 
Add Fallback When realpath Doesn't Support --relative-to

5 years agoMark zstddeclib-in.c Not Executable
W. Felix Handte [Mon, 4 May 2020 22:59:26 +0000 (18:59 -0400)] 
Mark zstddeclib-in.c Not Executable

5 years agofix minor conversion warnings 2106/head
Yann Collet [Mon, 4 May 2020 21:43:09 +0000 (14:43 -0700)] 
fix minor conversion warnings

5 years agoMerge pull request #1976 from felixhandte/minimal-lib-target
Felix Handte [Mon, 4 May 2020 19:42:56 +0000 (12:42 -0700)] 
Merge pull request #1976 from felixhandte/minimal-lib-target

Add Minification Variable to `lib/Makefile`

5 years agoTry to Fix Single File Library Combiner Script to Handle Relative Includes
W. Felix Handte [Fri, 1 May 2020 21:56:51 +0000 (17:56 -0400)] 
Try to Fix Single File Library Combiner Script to Handle Relative Includes

5 years agoRemove Useless Assignment in Makefile
W. Felix Handte [Fri, 1 May 2020 20:33:51 +0000 (16:33 -0400)] 
Remove Useless Assignment in Makefile

5 years agoAlso Move programs/ Directory to Relative Includes
W. Felix Handte [Fri, 1 May 2020 20:20:40 +0000 (16:20 -0400)] 
Also Move programs/ Directory to Relative Includes

5 years agoRewrite Include Paths to be Relative
W. Felix Handte [Fri, 1 May 2020 20:07:57 +0000 (16:07 -0400)] 
Rewrite Include Paths to be Relative

Addresses #1998.

5 years ago[bench] Extending largeNbDicts to compression (#2089)
Bimba Shrestha [Mon, 4 May 2020 17:42:22 +0000 (12:42 -0500)] 
[bench] Extending largeNbDicts to compression  (#2089)

* adding cdict_collection_t

* adding shuffleCDictionaries()

* adding compressInstructions

* adding compress()

* integrating compression into bench()

* copy paste error fix

* static analyzer uninit value complaint fix

* changing to control

* removing assert

* changing to control

* moving memcpy to seperate function

* fixing static analyzer complaint

* another hacky solution attempt

* Copying createbuffer logic

5 years agoMerge pull request #2099 from felixhandte/compile-under-pedantic
Felix Handte [Mon, 4 May 2020 17:07:13 +0000 (10:07 -0700)] 
Merge pull request #2099 from felixhandte/compile-under-pedantic

Compile Under `-pedantic -Werror` and `-std=c90`

5 years agoTest Flag in Travis CI 1976/head
W. Felix Handte [Mon, 4 May 2020 15:22:07 +0000 (11:22 -0400)] 
Test Flag in Travis CI

5 years agoAdd Space-Optimized Helper Variable to Lib Makefile
W. Felix Handte [Mon, 27 Jan 2020 22:14:08 +0000 (17:14 -0500)] 
Add Space-Optimized Helper Variable to Lib Makefile

This diff reorganizes the `lib/Makefile` to extract various settings that a
user would normally invoke together (supposing that they were aware of them)
if they were trying to build the smallest `libzstd` possible. It collects
these settings under a master setting `ZSTD_LIB_MIN_SIZE`.

Also document this new option.

5 years agoMerge pull request #1984 from MeghnaM/1636-Reduce-stack-usage-of-HUF_sort
Felix Handte [Mon, 4 May 2020 15:15:31 +0000 (08:15 -0700)] 
Merge pull request #1984 from MeghnaM/1636-Reduce-stack-usage-of-HUF_sort

Reduce stack usage of HUF_sort()

5 years agoTry to Fix MSVC Error 2099/head
W. Felix Handte [Fri, 1 May 2020 20:48:21 +0000 (16:48 -0400)] 
Try to Fix MSVC Error

It's complaining about the `memcpy`s, saying:

"warning C4090: 'function': different 'const' qualifiers"

Let's try explicitly casting to the argument types...

5 years agoDo a `-pedantic` Build in CircleCI
W. Felix Handte [Fri, 1 May 2020 16:26:20 +0000 (12:26 -0400)] 
Do a `-pedantic` Build in CircleCI

5 years agoFix Up Some Pointer Handling in Tests
W. Felix Handte [Fri, 1 May 2020 16:24:51 +0000 (12:24 -0400)] 
Fix Up Some Pointer Handling in Tests

5 years agoSwitch Helper Declaration to Not Force Inline
W. Felix Handte [Thu, 30 Apr 2020 21:43:20 +0000 (17:43 -0400)] 
Switch Helper Declaration to Not Force Inline

It was causing build issues in ANSI mode.

5 years agoPurge C++-Style Comments (`// ...`), Make Compilation Succeed Under C90
W. Felix Handte [Thu, 30 Apr 2020 21:33:59 +0000 (17:33 -0400)] 
Purge C++-Style Comments (`// ...`), Make Compilation Succeed Under C90

5 years agoAvoid inline Keyword in C90
W. Felix Handte [Thu, 30 Apr 2020 21:20:40 +0000 (17:20 -0400)] 
Avoid inline Keyword in C90

Previously we would use it for all gcc-like compilations, even when a
restrictive mode that disallowed it had been selected.

5 years agoDon't Evaluate Arguments to Dummy Function
W. Felix Handte [Thu, 30 Apr 2020 21:07:49 +0000 (17:07 -0400)] 
Don't Evaluate Arguments to Dummy Function

5 years agoAllow Empty Format Strings in Error Macro Invocations
W. Felix Handte [Thu, 30 Apr 2020 17:09:14 +0000 (13:09 -0400)] 
Allow Empty Format Strings in Error Macro Invocations

`-Wall` implies `-Wformat-zero-length`, which will cause compilation to fail
under `-Werror` when an empty string is passed as the format string to a
`printf`-family function. This commit moves us back to prefixing the provided
format string, which successfully avoids that warning.

However, this removes the failure mode where that `RAWLOG` invocation would
fail to compile when no format string was provided at all (which was desirable
to avoid having code that would successfully compile normally but fail under
`-pedantic`, which *does* require that a non-zero number of args are provided).

So this commit also introduces a function which does nothing at all, but will
fail to compile if not provided with at least one argument, which is a string.
This successfully links the compilability of pedantic and non-pedantic builds.

5 years agoMake All Invocations Start With Literal Format String
W. Felix Handte [Thu, 30 Apr 2020 17:08:36 +0000 (13:08 -0400)] 
Make All Invocations Start With Literal Format String

5 years agoMake Error Macro Invocation Without Info String Fail to Compile
W. Felix Handte [Thu, 30 Apr 2020 16:26:29 +0000 (12:26 -0400)] 
Make Error Macro Invocation Without Info String Fail to Compile

Even without `-pedantic`, these macros will now fail to compile unless you
provide an info string argument. This will prevent us from regressing.

5 years agoAdd (Possibly Empty) Info Strings to All Variadic Error Handling Macro Invocations
W. Felix Handte [Thu, 30 Apr 2020 16:24:56 +0000 (12:24 -0400)] 
Add (Possibly Empty) Info Strings to All Variadic Error Handling Macro Invocations

5 years agoFix superblock mode (#2100)
Nick Terrell [Fri, 1 May 2020 23:11:47 +0000 (16:11 -0700)] 
Fix superblock mode (#2100)

Fixes:

Enable RLE blocks for superblock mode
Fix the limitation that the literals block must shrink. Instead, when we're within 200 bytes of the next header byte size, we will just use the next one up. That way we should (almost?) always have space for the table.
Remove the limitation that the first sub-block MUST have compressed literals and be compressed. Now one sub-block MUST be compressed (otherwise we fall back to raw block which is okay, since that is streamable). If no block has compressed literals that is okay, we will fix up the next Huffman table.
Handle the case where the last sub-block is uncompressed (maybe it is very small). Before it would skip superblock in this case, now we allow the last sub-block to be uncompressed. To do this we need to regenerate the correct repcodes.
Respect disableLiteralsCompression in superblock mode
Fix superblock mode to handle a block consisting of only compressed literals
Fix a off by 1 error in superblock mode that disabled it whenever there were last literals
Fix superblock mode with long literals/matches (> 0xFFFF)
Allow superblock mode to repeat Huffman tables
Respect ZSTD_minGain().
Tests:

Simple check for the condition in #2096.
When the simple_round_trip fuzzer enables superblock mode, it checks that the compressed size isn't expanded too much.
Remaining limitations:

O(targetCBlockSize^2) because we recompute statistics every sequence
Unable to split literals of length > targetCBlockSize into multiple sequences
Refuses to generate sub-blocks that don't shrink the compressed data, so we could end up with large sub-blocks. We should emit those sections as uncompressed blocks instead.
...
Fixes #2096

5 years agoFix broken CI; make changes in response to the comments 1984/head
Meghna Malhotra [Wed, 1 Apr 2020 05:46:49 +0000 (22:46 -0700)] 
Fix broken CI; make changes in response to the comments

5 years agoRemove magic constant and made other changes addressing the comments
Meghna Malhotra [Thu, 27 Feb 2020 16:32:44 +0000 (22:02 +0530)] 
Remove magic constant and made other changes addressing the comments

5 years agoFixed tests to use correct workspace size
Meghna Malhotra [Sun, 2 Feb 2020 02:26:14 +0000 (18:26 -0800)] 
Fixed tests to use correct workspace size

5 years agoWIP: Still getting an error
Meghna Malhotra [Sat, 1 Feb 2020 23:34:51 +0000 (15:34 -0800)] 
WIP: Still getting an error

5 years agoWIP: Increased wksp size, but it's segfaulting
Meghna Malhotra [Sat, 1 Feb 2020 20:41:05 +0000 (12:41 -0800)] 
WIP: Increased wksp size, but it's segfaulting

5 years agoMove rank table into HUF_buildCTable_wksp()
Meghna Malhotra [Sat, 1 Feb 2020 19:56:31 +0000 (11:56 -0800)] 
Move rank table into HUF_buildCTable_wksp()

5 years agoMerge pull request #2101 from bimbashrestha/meson
Bimba Shrestha [Fri, 1 May 2020 17:52:37 +0000 (12:52 -0500)] 
Merge pull request #2101 from bimbashrestha/meson

[build] fix meson build issue

5 years agomeson msvc build fix 2101/head
Bimba Shrestha [Fri, 1 May 2020 14:04:09 +0000 (09:04 -0500)] 
meson msvc build fix

5 years agoMerge pull request #2097 from facebook/underlink
Yann Collet [Thu, 30 Apr 2020 17:16:24 +0000 (10:16 -0700)] 
Merge pull request #2097 from facebook/underlink

Fix underlinked libzstd

5 years agofixed zstd-nolegacy target 2097/head
Yann Collet [Wed, 29 Apr 2020 18:56:21 +0000 (11:56 -0700)] 
fixed zstd-nolegacy target

when compiled as part of allVariants

(though I'm unsure why it was working before ...)

5 years agoadded test linking user program to multi-threaded libzstd
Yann Collet [Wed, 29 Apr 2020 04:18:29 +0000 (21:18 -0700)] 
added test linking user program to multi-threaded libzstd

5 years agogeneralized pattern rules
Yann Collet [Wed, 29 Apr 2020 01:43:55 +0000 (18:43 -0700)] 
generalized pattern rules

5 years agofix libzstd-mt underlinking issue
Yann Collet [Wed, 29 Apr 2020 01:29:20 +0000 (18:29 -0700)] 
fix libzstd-mt underlinking issue

fix #2045
When compiling `libzstd` in multithreading mode,
the `libzstd-mt` recipe would not include `-pthread`,
resulting in an underlinked dynamic library.

Added a test on Travis to check that the library is fully linked.

This makes it possible, in some future release,
to build a multi-threaded `libzstd` dynamic library by default
as it would no longer impact the build script of user programs.

5 years agoMerge pull request #2094 from terrelln/stable-dst
Nick Terrell [Wed, 29 Apr 2020 00:53:24 +0000 (17:53 -0700)] 
Merge pull request #2094 from terrelln/stable-dst

[lib] Add ZSTD_d_stableOutBuffer + fix single-pass mode for empty frames

5 years agonew tests created new artifacts
Yann Collet [Tue, 28 Apr 2020 22:58:22 +0000 (15:58 -0700)] 
new tests created new artifacts

they were not properly ignored

5 years agoAdd extra warnings about not modifying the ZSTD_outBuffer 2094/head
Nick Terrell [Tue, 28 Apr 2020 19:07:42 +0000 (12:07 -0700)] 
Add extra warnings about not modifying the ZSTD_outBuffer

5 years agoMerge pull request #2048 from nocnokneo/ctest-support
Nick Terrell [Tue, 28 Apr 2020 18:01:13 +0000 (11:01 -0700)] 
Merge pull request #2048 from nocnokneo/ctest-support

Add CTest support

5 years ago[fuzz] Fuzz test ZSTD_d_stableOutBuffer
Nick Terrell [Tue, 28 Apr 2020 01:25:47 +0000 (18:25 -0700)] 
[fuzz] Fuzz test ZSTD_d_stableOutBuffer

5 years agoAdd some comments
Nick Terrell [Tue, 28 Apr 2020 01:25:30 +0000 (18:25 -0700)] 
Add some comments

5 years ago[lib] Fix single-pass mode for empty frames
Nick Terrell [Tue, 28 Apr 2020 01:10:45 +0000 (18:10 -0700)] 
[lib] Fix single-pass mode for empty frames

5 years ago[lib] Add ZSTD_d_stableOutBuffer
Nick Terrell [Tue, 28 Apr 2020 00:42:03 +0000 (17:42 -0700)] 
[lib] Add ZSTD_d_stableOutBuffer

5 years ago[zstd] Fix typo in ZSTD_dParameter
Nick Terrell [Mon, 27 Apr 2020 19:12:28 +0000 (12:12 -0700)] 
[zstd] Fix typo in ZSTD_dParameter

5 years agoMerge pull request #2088 from bimbashrestha/bug
Bimba Shrestha [Thu, 23 Apr 2020 19:16:56 +0000 (14:16 -0500)] 
Merge pull request #2088 from bimbashrestha/bug

[bug] Making compressStream2 fail when passing rawContent but claiming fullDict

5 years agoMerge pull request #2086 from bimbashrestha/quick3
Bimba Shrestha [Thu, 23 Apr 2020 18:02:57 +0000 (13:02 -0500)] 
Merge pull request #2086 from bimbashrestha/quick3

[bug] passing cParams.hashLog instead of comprParams->hashLog for ldm trigger

5 years agopassing dictContentType instead of rawContent every time 2088/head
Bimba Shrestha [Wed, 22 Apr 2020 05:29:35 +0000 (22:29 -0700)] 
passing dictContentType instead of rawContent every time

5 years agoadding fail test when passing wrong fullDict using refPrefix
Bimba Shrestha [Wed, 22 Apr 2020 05:26:48 +0000 (22:26 -0700)] 
adding fail test when passing wrong fullDict using refPrefix

5 years agobash to shell conversion 2086/head
Bimba Shrestha [Wed, 22 Apr 2020 03:31:11 +0000 (20:31 -0700)] 
bash to shell conversion

5 years agochanging to cParams.hashLog
Bimba Shrestha [Wed, 22 Apr 2020 02:12:50 +0000 (21:12 -0500)] 
changing to cParams.hashLog

5 years agoadding test for long mode trigger
Bimba Shrestha [Wed, 22 Apr 2020 02:04:55 +0000 (21:04 -0500)] 
adding test for long mode trigger

5 years agoMerge pull request #2085 from bimbashrestha/quick2
Bimba Shrestha [Mon, 20 Apr 2020 19:09:23 +0000 (14:09 -0500)] 
Merge pull request #2085 from bimbashrestha/quick2

[doc-bug] Updating the recommended max chainlog for patch-from

5 years agoupdating chainlog bound 2085/head
Bimba Shrestha [Mon, 20 Apr 2020 18:34:24 +0000 (11:34 -0700)] 
updating chainlog bound

5 years agoMerge pull request #2083 from bimbashrestha/quick1
Bimba Shrestha [Mon, 20 Apr 2020 18:24:34 +0000 (13:24 -0500)] 
Merge pull request #2083 from bimbashrestha/quick1

[nit] Adding missing newline at end of patch-from recommendations

5 years agoadding newline 2083/head
Bimba Shrestha [Mon, 20 Apr 2020 17:25:58 +0000 (10:25 -0700)] 
adding newline

5 years agoAdding --long support for --patch-from (#1959)
Bimba Shrestha [Fri, 17 Apr 2020 20:58:53 +0000 (15:58 -0500)] 
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

5 years agoMerge pull request #2080 from facebook/minor_fileio_refactor
Yann Collet [Tue, 14 Apr 2020 03:47:34 +0000 (20:47 -0700)] 
Merge pull request #2080 from facebook/minor_fileio_refactor

minor refactor of `fileio.c`

5 years agominor refactor 2080/head
Yann Collet [Mon, 13 Apr 2020 17:13:29 +0000 (10:13 -0700)] 
minor refactor

- fix a few comments
- reorder some parameters, to enforce "mutable references first"
- simplified fwriteSparse()

5 years agoMerge pull request #2040 from caoyzh/dev-2
Nick Terrell [Wed, 8 Apr 2020 20:14:47 +0000 (13:14 -0700)] 
Merge pull request #2040 from caoyzh/dev-2

Optimize by prefetching on aarch64

5 years agoMerge pull request #2075 from bimbashrestha/dict_fuzzer_ref
Bimba Shrestha [Tue, 7 Apr 2020 22:37:19 +0000 (17:37 -0500)] 
Merge pull request #2075 from bimbashrestha/dict_fuzzer_ref

[bug] handling case where prefix is NULL or 0 sized in refPrefix_advanced

5 years agohandling nil case for refprefix 2075/head
Bimba Shrestha [Tue, 7 Apr 2020 21:41:53 +0000 (14:41 -0700)] 
handling nil case for refprefix

5 years agoMerge pull request #2065 from cwoffenden/single-file-lib
Yann Collet [Tue, 7 Apr 2020 17:17:05 +0000 (10:17 -0700)] 
Merge pull request #2065 from cwoffenden/single-file-lib

Single-file decoder script can now (optionally) create an encoder

5 years agoFixed clash when projects are already using xxHash 2065/head
Carl Woffenden [Tue, 7 Apr 2020 16:17:59 +0000 (18:17 +0200)] 
Fixed clash when projects are already using xxHash

Undefing XXH_* macros allows the `.c` to build standalone without clashes. Removing `xxhash.c` and only including the header is the correct usage (according to `XXH_PRIVATE_API`).

5 years agoFixed-up single-file libs directory
Carl Woffenden [Tue, 7 Apr 2020 11:35:19 +0000 (13:35 +0200)] 
Fixed-up single-file libs directory

5 years agoRenamed directory
Carl Woffenden [Tue, 7 Apr 2020 11:34:19 +0000 (13:34 +0200)] 
Renamed directory

5 years agoImproved documentation
Carl Woffenden [Tue, 7 Apr 2020 11:19:52 +0000 (13:19 +0200)] 
Improved documentation

5 years agoFurther replication removed
Carl Woffenden [Tue, 7 Apr 2020 09:25:16 +0000 (11:25 +0200)] 
Further replication removed

`CHECK_F` is now in `error_private.h`. Minor tidy.

5 years agoMerge remote-tracking branch 'upstream/dev' into single-file-lib
Carl Woffenden [Tue, 7 Apr 2020 09:13:02 +0000 (11:13 +0200)] 
Merge remote-tracking branch 'upstream/dev' into single-file-lib

5 years agoCode replicated in compression and decompression moved to shared headers
Carl Woffenden [Tue, 7 Apr 2020 09:02:06 +0000 (11:02 +0200)] 
Code replicated in compression and decompression moved to shared headers

`CHECK_F` macro moved to `error_private.h` (shared between `fse_compress.c` and `fse_decompress.c`). `ZSTD_limitCopy()` moved to `zstd_internal.h` (shared between `zstd_compress.c` and `zstd_decompress.c`). Erroneous build artefact `zstd.h` removed from repo.

5 years agoadding refPrefix
Bimba Shrestha [Tue, 7 Apr 2020 05:57:49 +0000 (22:57 -0700)] 
adding refPrefix

5 years agoMerge pull request #2069 from bimbashrestha/doversize
Bimba Shrestha [Mon, 6 Apr 2020 21:06:37 +0000 (16:06 -0500)] 
Merge pull request #2069 from bimbashrestha/doversize

[memory opt] Downsize decompression buffers when large for too long

5 years agoadding test for dctx size reduction 2069/head
Bimba Shrestha [Sat, 4 Apr 2020 15:49:24 +0000 (08:49 -0700)] 
adding test for dctx size reduction

5 years agoMerge pull request #2068 from bimbashrestha/quick
Bimba Shrestha [Sat, 4 Apr 2020 00:28:42 +0000 (19:28 -0500)] 
Merge pull request #2068 from bimbashrestha/quick

[bug] Fixing Incorrect/inconsistent reported compression percentage for empty files

5 years agomoving consts to zstd_internal and reusing them
Bimba Shrestha [Fri, 3 Apr 2020 21:26:15 +0000 (14:26 -0700)] 
moving consts to zstd_internal and reusing them

5 years agoconverting to if
Bimba Shrestha [Fri, 3 Apr 2020 21:21:24 +0000 (14:21 -0700)] 
converting to if

5 years agoadding dctx to function name
Bimba Shrestha [Fri, 3 Apr 2020 21:14:46 +0000 (14:14 -0700)] 
adding dctx to function name

5 years agoonly computing sizes once
Bimba Shrestha [Fri, 3 Apr 2020 21:12:23 +0000 (14:12 -0700)] 
only computing sizes once

5 years agoUsing in and out size together
Bimba Shrestha [Fri, 3 Apr 2020 21:09:21 +0000 (14:09 -0700)] 
Using in and out size together

5 years agoMerge pull request #2067 from bimbashrestha/res-leak
Bimba Shrestha [Fri, 3 Apr 2020 20:51:59 +0000 (15:51 -0500)] 
Merge pull request #2067 from bimbashrestha/res-leak

[bug] adding fclose before return

5 years agoreturning on null check 2067/head
Bimba Shrestha [Fri, 3 Apr 2020 20:39:02 +0000 (13:39 -0700)] 
returning on null check