]> git.ipfire.org Git - thirdparty/zstd.git/log
thirdparty/zstd.git
6 years agomeson: Update build guide [skip ci] 1483/head
Lzu Tao [Fri, 28 Dec 2018 04:17:11 +0000 (11:17 +0700)] 
meson: Update build guide [skip ci]

6 years agoMerge pull request #1479 from facebook/visualTest 1480/head v1.3.8
Yann Collet [Thu, 27 Dec 2018 12:42:44 +0000 (04:42 -0800)] 
Merge pull request #1479 from facebook/visualTest

Fix remaining Windows errors

6 years agofixed detection of input==output on Visual 1479/head
Yann Collet [Wed, 26 Dec 2018 23:51:34 +0000 (15:51 -0800)] 
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.

6 years agofixed playTests.sh for minGW
Yann Collet [Wed, 26 Dec 2018 23:19:09 +0000 (15:19 -0800)] 
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.

6 years agoMerge pull request #1477 from hjmjohnson/update-ZSTD_LEGACY_SUPPORT
Yann Collet [Wed, 26 Dec 2018 19:40:28 +0000 (11:40 -0800)] 
Merge pull request #1477 from hjmjohnson/update-ZSTD_LEGACY_SUPPORT

ENH: Update to -DZSTD_LEGACY_SUPPORT=5

6 years agoENH: Update to -DZSTD_LEGACY_SUPPORT=5 1477/head
Hans Johnson [Wed, 26 Dec 2018 19:17:31 +0000 (13:17 -0600)] 
ENH: Update to -DZSTD_LEGACY_SUPPORT=5

6 years agofixed VS2008 project
Yann Collet [Tue, 25 Dec 2018 23:04:49 +0000 (15:04 -0800)] 
fixed VS2008 project

bench.c => benchfn.c + benchzstd.c
wrong util.c from prior patch

and warnings :
C4127

6 years agoadded *visual* branches to long tests on Appveyor
Yann Collet [Tue, 25 Dec 2018 22:55:45 +0000 (14:55 -0800)] 
added *visual* branches to long tests on Appveyor

6 years agocreate appveyor test branch
Yann Collet [Tue, 25 Dec 2018 22:20:33 +0000 (14:20 -0800)] 
create appveyor test branch

which will execute same tests as `master` branch
hence including older Visual version

6 years agoupdated libzstd documentation
Yann Collet [Tue, 25 Dec 2018 11:10:07 +0000 (03:10 -0800)] 
updated libzstd documentation

6 years agoMerge pull request #1476 from facebook/unifiedTravisYml
Yann Collet [Tue, 25 Dec 2018 10:32:16 +0000 (02:32 -0800)] 
Merge pull request #1476 from facebook/unifiedTravisYml

Unified travis.yml

6 years agoMerge pull request #1473 from facebook/minDecTest
Yann Collet [Tue, 25 Dec 2018 00:36:03 +0000 (16:36 -0800)] 
Merge pull request #1473 from facebook/minDecTest

fixed tests for minimal decoder builds

6 years agopush more tests to master 1476/head
Yann Collet [Mon, 24 Dec 2018 12:15:41 +0000 (04:15 -0800)] 
push more tests to master

to reduce test time for dev

6 years agoMerge pull request #1472 from hjmjohnson/modernize-cmake-syntax
Yann Collet [Mon, 24 Dec 2018 20:24:29 +0000 (12:24 -0800)] 
Merge pull request #1472 from hjmjohnson/modernize-cmake-syntax

Modernize cmake syntax

6 years agoDOC: Provide documentation for cmake best practices. 1472/head
Hans Johnson [Mon, 24 Dec 2018 13:06:31 +0000 (07:06 -0600)] 
DOC: Provide documentation for cmake best practices.

6 years agomaster branch selector
Yann Collet [Mon, 24 Dec 2018 11:44:57 +0000 (03:44 -0800)] 
master branch selector

6 years agoadded master tests
Yann Collet [Mon, 24 Dec 2018 11:31:40 +0000 (03:31 -0800)] 
added master tests

6 years agofixed tests for minimal decoder builds 1473/head
Yann Collet [Mon, 24 Dec 2018 10:56:21 +0000 (02:56 -0800)] 
fixed tests for minimal decoder builds

It's incorrect to mix targets `all` and `check` with directive -j.
They will be build in parallel
and resulting artifacts will fight each other
with different sets of build options (such as DEBUGLEVEL).

6 years agoMerge pull request #1471 from facebook/nofloat
Yann Collet [Sun, 23 Dec 2018 20:35:51 +0000 (12:35 -0800)] 
Merge pull request #1471 from facebook/nofloat

guard functions using floating point for debug mode only

6 years agoMerge pull request #1470 from facebook/U32
Yann Collet [Sun, 23 Dec 2018 20:35:39 +0000 (12:35 -0800)] 
Merge pull request #1470 from facebook/U32

fix confusion between unsigned <-> U32

6 years agoMerge pull request #1469 from facebook/travisTest
Yann Collet [Sun, 23 Dec 2018 03:57:16 +0000 (19:57 -0800)] 
Merge pull request #1469 from facebook/travisTest

update travis test

6 years agoSTYLE: Remove CMake-language block-end command arguments
Hans Johnson [Sun, 23 Dec 2018 01:31:50 +0000 (19:31 -0600)] 
STYLE: Remove CMake-language block-end command arguments

Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the block.
This is no longer the preferred style.

6 years agoSTYLE: Convert CMake-language commands to lower case
Hans Johnson [Sun, 23 Dec 2018 01:31:59 +0000 (19:31 -0600)] 
STYLE: Convert CMake-language commands to lower case

Ancient CMake versions required upper-case commands.  Later command names
became case-insensitive.  Now the preferred style is lower-case.

6 years agoupdated CHANGELOG for v1.3.8
Yann Collet [Sat, 22 Dec 2018 20:10:29 +0000 (12:10 -0800)] 
updated CHANGELOG for v1.3.8

6 years agoguard functions using floating point for debug mode only 1471/head
Yann Collet [Sat, 22 Dec 2018 17:09:40 +0000 (09:09 -0800)] 
guard functions using floating point for debug mode only

they are only used to print debug messages.
Requested in #1386,

6 years agofix confusion between unsigned <-> U32 1470/head
Yann Collet [Sat, 22 Dec 2018 00:19:44 +0000 (16:19 -0800)] 
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 ?

6 years agoupdate aarch64 test to xenial 1469/head
Yann Collet [Fri, 21 Dec 2018 23:08:48 +0000 (15:08 -0800)] 
update aarch64 test to xenial

in an attempt to circumvent the `ld` bug

6 years agoMerge pull request #1466 from facebook/noDictPresent
Yann Collet [Fri, 21 Dec 2018 03:01:27 +0000 (19:01 -0800)] 
Merge pull request #1466 from facebook/noDictPresent

fixed : better error message

6 years agoMerge pull request #1467 from terrelln/regression
Nick Terrell [Fri, 21 Dec 2018 02:14:13 +0000 (18:14 -0800)] 
Merge pull request #1467 from terrelln/regression

[regression] Update results.csv

6 years ago[regression] Update results.csv 1467/head
Nick Terrell [Fri, 21 Dec 2018 01:40:45 +0000 (17:40 -0800)] 
[regression] Update results.csv

6 years agoadded strerror in comment 1466/head
Yann Collet [Fri, 21 Dec 2018 01:27:08 +0000 (17:27 -0800)] 
added strerror in comment

as suggested by @felixhandte

6 years agoMerge pull request #1465 from facebook/noFilePresent
Yann Collet [Fri, 21 Dec 2018 01:21:04 +0000 (17:21 -0800)] 
Merge pull request #1465 from facebook/noFilePresent

 fixed : detection of non-existing file

6 years agofixed : better error message when dictionary missing
Yann Collet [Fri, 21 Dec 2018 01:20:07 +0000 (17:20 -0800)] 
fixed : better error message when dictionary missing

during benchmark.
Also : refactored ZSTD_fillHashTable(),
just for readability (it does the same thing)

6 years agofixed zlibwrapper examples build 1465/head
Yann Collet [Thu, 20 Dec 2018 23:28:03 +0000 (15:28 -0800)] 
fixed zlibwrapper examples build

6 years agoMerge pull request #1420 from felixhandte/zstd-decompress-minimal
Yann Collet [Thu, 20 Dec 2018 23:17:37 +0000 (15:17 -0800)] 
Merge pull request #1420 from felixhandte/zstd-decompress-minimal

Various Macros to Allow Building Extremely Minimal Decoder Library

6 years agoMerge pull request #1463 from yijinfb/getenv
Yann Collet [Thu, 20 Dec 2018 23:17:00 +0000 (15:17 -0800)] 
Merge pull request #1463 from yijinfb/getenv

Add support for environment variable ZSTD_CLEVEL in CLI

6 years agofixed shadowing of stat variable
Yann Collet [Thu, 20 Dec 2018 22:56:44 +0000 (14:56 -0800)] 
fixed shadowing of stat variable

some standard lib declares a `stat` variable at global scope
shadowing local declarations ....

6 years agofixed shadowing of variable time
Yann Collet [Thu, 20 Dec 2018 22:54:05 +0000 (14:54 -0800)] 
fixed shadowing of variable time

some standard lib do define `time` as a global variable
shadowing local declarations ...

6 years agofixed wrong assert condition
Yann Collet [Thu, 20 Dec 2018 22:46:23 +0000 (14:46 -0800)] 
fixed wrong assert condition

6 years agofixed file identity detection in 32-bit mode
Yann Collet [Thu, 20 Dec 2018 22:30:30 +0000 (14:30 -0800)] 
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  :(

6 years agofixed stdlib implementation of time functions
Yann Collet [Thu, 20 Dec 2018 22:02:50 +0000 (14:02 -0800)] 
fixed stdlib implementation of time functions

generated redefinitions

6 years agoremoved strncpy() from `util.c`
Yann Collet [Thu, 20 Dec 2018 20:27:12 +0000 (12:27 -0800)] 
removed strncpy() from `util.c`

as Visual surprisingly complains about their usage.
Replaced by memcpy()

6 years agoMask Off Unused Functions When ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG 1420/head
W. Felix Handte [Thu, 20 Dec 2018 20:20:34 +0000 (12:20 -0800)] 
Mask Off Unused Functions When ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG

6 years agoMask Off Unused Functions When ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT
W. Felix Handte [Thu, 20 Dec 2018 20:15:07 +0000 (12:15 -0800)] 
Mask Off Unused Functions When ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT

6 years agoUpdate Travis Jobs to Run Shorter Tests with -Werror
W. Felix Handte [Thu, 20 Dec 2018 20:10:51 +0000 (12:10 -0800)] 
Update Travis Jobs to Run Shorter Tests with -Werror

6 years agouse strerror() to generate error message
Yann Collet [Thu, 20 Dec 2018 17:16:40 +0000 (09:16 -0800)] 
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.

6 years agochange function name: _readU32FromChar() -> readU32FromCharChecked() 1463/head
Yi Jin [Thu, 20 Dec 2018 07:41:18 +0000 (23:41 -0800)] 
change function name: _readU32FromChar() -> readU32FromCharChecked()

6 years agofixed 1 transitive include
Yann Collet [Thu, 20 Dec 2018 02:38:37 +0000 (18:38 -0800)] 
fixed 1 transitive include

6 years agoMerge pull request #1464 from facebook/sysErrStr
Yann Collet [Thu, 20 Dec 2018 02:33:10 +0000 (18:33 -0800)] 
Merge pull request #1464 from facebook/sysErrStr

add more system error strings

6 years agofixed : detection of non-existing file
Yann Collet [Thu, 20 Dec 2018 02:30:57 +0000 (18:30 -0800)] 
fixed : detection of non-existing file

better error message
with test

6 years agomake init_cLevel(...) static
Yi Jin [Thu, 20 Dec 2018 01:56:45 +0000 (17:56 -0800)] 
make init_cLevel(...) static

6 years agoMerge pull request #1461 from terrelln/regression
Yann Collet [Thu, 20 Dec 2018 01:53:15 +0000 (17:53 -0800)] 
Merge pull request #1461 from terrelln/regression

[regression] Add more configs

6 years agofix the code ahead of declaration issue
Yi Jin [Thu, 20 Dec 2018 01:49:04 +0000 (17:49 -0800)] 
fix the code ahead of declaration issue

6 years agoMerge pull request #1462 from facebook/btultra2.3
Yann Collet [Thu, 20 Dec 2018 01:48:11 +0000 (17:48 -0800)] 
Merge pull request #1462 from facebook/btultra2.3

fixed ossfuzz 11849

6 years agochange int init_cLevel() to int init_cLevel(void)
Yi Jin [Thu, 20 Dec 2018 01:38:28 +0000 (17:38 -0800)] 
change int init_cLevel() to int init_cLevel(void)

6 years agoadded system error strings 1464/head
Yann Collet [Thu, 20 Dec 2018 01:25:58 +0000 (17:25 -0800)] 
added system error strings

to more failure cases in fileio.c
as requested by fbpkg

6 years agoedit README.md
Yi Jin [Thu, 20 Dec 2018 01:09:54 +0000 (17:09 -0800)] 
edit README.md

6 years agoadd a section on restricted support of environment variables to README.md
Yi Jin [Thu, 20 Dec 2018 01:06:56 +0000 (17:06 -0800)] 
add a section on restricted support of environment variables to README.md

6 years agofixed OSSfuzz 11849 1462/head
Yann Collet [Thu, 20 Dec 2018 00:54:15 +0000 (16:54 -0800)] 
fixed OSSfuzz 11849

The problem was already masked,
due to no longer accepting tiny blocks for statistics.

But in case it could still happen with not-so-tiny blocks,
there is a stricter control which ensures that
nothing was already loaded prior to statistics collection.

6 years agorefactor readU32FromChar(...), improve init_cLevel(...), and add env var ZSTD_CLEVEL...
Yi Jin [Thu, 20 Dec 2018 00:45:42 +0000 (16:45 -0800)] 
refactor readU32FromChar(...), improve init_cLevel(...), and add env var ZSTD_CLEVEL tests

6 years ago[regression] Add more configs 1461/head
Nick Terrell [Thu, 20 Dec 2018 00:24:59 +0000 (16:24 -0800)] 
[regression] Add more configs

* Add configs that test multithreading, LDM, and setting explicit
  parameters.
* Update the `compress cctx` method to accept `ZSTD_parameters`.
* Compile against the multithreaded `libzstd.a`.
* Update `results.csv` for the new configs.

Unless you think there are more configs/methods I should test, I think
we have a fairly wide set of configs/methods, so I'll pause adding
more for now.

6 years agoMerge pull request #1460 from facebook/btultra2.2
Yann Collet [Wed, 19 Dec 2018 23:00:15 +0000 (15:00 -0800)] 
Merge pull request #1460 from facebook/btultra2.2

fixed: compression ratio discrepancy

6 years agoadded tests case 1460/head
Yann Collet [Wed, 19 Dec 2018 22:10:27 +0000 (14:10 -0800)] 
added tests case

6 years agoadd support for setting compression level through environment variable ZSTD_CLEVEL
Yi Jin [Wed, 19 Dec 2018 21:26:27 +0000 (13:26 -0800)] 
add support for setting compression level through environment variable ZSTD_CLEVEL

6 years agoUse Unused Variable in ERR_getErrorString()
W. Felix Handte [Wed, 19 Dec 2018 20:36:10 +0000 (12:36 -0800)] 
Use Unused Variable in ERR_getErrorString()

6 years agoMerge pull request #1454 from lzutao/readme
Yann Collet [Wed, 19 Dec 2018 18:43:27 +0000 (10:43 -0800)] 
Merge pull request #1454 from lzutao/readme

README: Explain a little bit about Meson build

6 years agofixed: compression ratio discrepancy
Yann Collet [Wed, 19 Dec 2018 18:11:06 +0000 (10:11 -0800)] 
fixed: compression ratio discrepancy

depending on initialization,
the first byte of a new frame was invalidated or not.

As a consequence, one match opportunity was available or not,
resulting in slightly different compressed sizes
(on average, 1 or 2 bytes once every 20 frames).

It impacted ratio comparison between one-shot and streaming modes.

This fix makes the first byte of a new frame always a valid match.
Now compressed size is always the same.
It also improves compressed size by a negligible amount.

6 years agoREADME: Explain a bit more about Meson build [skip ci] 1454/head
Lzu Tao [Sat, 15 Dec 2018 03:39:17 +0000 (10:39 +0700)] 
README: Explain a bit more about Meson build [skip ci]

- Increase one heading level. Now headings is bigger and prettier.

6 years agoMerge pull request #1459 from terrelln/destroy
Nick Terrell [Wed, 19 Dec 2018 01:03:54 +0000 (17:03 -0800)] 
Merge pull request #1459 from terrelln/destroy

[zstdcli] Refuse to overwrite input file

6 years agoAlso compare device thanks to @felixhandte 1459/head
Nick Terrell [Tue, 18 Dec 2018 23:40:27 +0000 (15:40 -0800)] 
Also compare device thanks to @felixhandte

6 years ago[zstdcli] Refuse to overwrite input file
Nick Terrell [Tue, 18 Dec 2018 23:29:54 +0000 (15:29 -0800)] 
[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.

6 years agoMerge pull request #1458 from terrelln/estimate
Yann Collet [Tue, 18 Dec 2018 23:12:21 +0000 (15:12 -0800)] 
Merge pull request #1458 from terrelln/estimate

[libzstd] Fix estimate with negative levels

6 years agoMerge pull request #1457 from facebook/btultra2.1
Yann Collet [Tue, 18 Dec 2018 22:46:55 +0000 (14:46 -0800)] 
Merge pull request #1457 from facebook/btultra2.1

btultra2 and very small input

6 years ago[libzstd] Fix estimate with negative levels 1458/head
Nick Terrell [Tue, 18 Dec 2018 22:24:49 +0000 (14:24 -0800)] 
[libzstd] Fix estimate with negative levels

* Fix `ZSTD_estimateCCtxSize()` with negative levels.
* Fix `ZSTD_estimateCStreamSize()` with negative levels.
* Add a unit test to test for this error.

6 years agofix debug levels 1457/head
Yann Collet [Tue, 18 Dec 2018 21:40:07 +0000 (13:40 -0800)] 
fix debug levels

as reported by @terrelln.
2 is reserved for temporary usage only.

6 years agoFix Incorrect assert()
W. Felix Handte [Tue, 18 Dec 2018 21:35:57 +0000 (13:35 -0800)] 
Fix Incorrect assert()

6 years agoAdd Logic to Makefile to Convert Make Vars to Defines
W. Felix Handte [Thu, 6 Dec 2018 20:32:32 +0000 (12:32 -0800)] 
Add Logic to Makefile to Convert Make Vars to Defines

6 years agoDocument Macros in README
W. Felix Handte [Thu, 6 Dec 2018 18:32:36 +0000 (10:32 -0800)] 
Document Macros in README

6 years agoAdd Contbuild Tests
W. Felix Handte [Wed, 5 Dec 2018 22:04:57 +0000 (14:04 -0800)] 
Add Contbuild Tests

6 years agoAdd Mutual-Exclusion Error
W. Felix Handte [Tue, 4 Dec 2018 19:52:40 +0000 (11:52 -0800)] 
Add Mutual-Exclusion Error

6 years agoAdd HUF_FORCE_DECOMPRESS_X2
W. Felix Handte [Tue, 4 Dec 2018 19:44:02 +0000 (11:44 -0800)] 
Add HUF_FORCE_DECOMPRESS_X2

6 years agoMove HUF_DGEN Up Out of X1 Definitions
W. Felix Handte [Tue, 4 Dec 2018 19:42:59 +0000 (11:42 -0800)] 
Move HUF_DGEN Up Out of X1 Definitions

6 years agoRefactor Huffman Decompression Away From Ternary Tree in ZSTD_decodeLiteralsBlock
W. Felix Handte [Tue, 4 Dec 2018 19:24:36 +0000 (11:24 -0800)] 
Refactor Huffman Decompression Away From Ternary Tree in ZSTD_decodeLiteralsBlock

6 years agoRename HUF_DECOMPRESS_MINIMAL -> HUF_FORCE_DECOMPRESS_X1
W. Felix Handte [Tue, 4 Dec 2018 18:01:58 +0000 (10:01 -0800)] 
Rename HUF_DECOMPRESS_MINIMAL -> HUF_FORCE_DECOMPRESS_X1

6 years agoAdd ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG
W. Felix Handte [Tue, 4 Dec 2018 01:36:24 +0000 (17:36 -0800)] 
Add ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG

This macro forces behavior in the opposite direction.

6 years agoRename ZSTD_DECOMPRESS_MINIMAL -> ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT
W. Felix Handte [Tue, 4 Dec 2018 01:28:02 +0000 (17:28 -0800)] 
Rename ZSTD_DECOMPRESS_MINIMAL -> ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT

6 years agoRemove Error Strings with ZSTD_STRIP_ERROR_STRINGS
W. Felix Handte [Sat, 17 Nov 2018 00:44:41 +0000 (16:44 -0800)] 
Remove Error Strings with ZSTD_STRIP_ERROR_STRINGS

6 years agoAdd Option to Not Request Inlining with ZSTD_NO_INLINE
W. Felix Handte [Sat, 17 Nov 2018 00:43:57 +0000 (16:43 -0800)] 
Add Option to Not Request Inlining with ZSTD_NO_INLINE

6 years agoAdd ZSTD_DECOMPRESS_MINIMAL Macro, Which Reduces Branching of Decompress Variants
W. Felix Handte [Fri, 16 Nov 2018 23:02:11 +0000 (15:02 -0800)] 
Add ZSTD_DECOMPRESS_MINIMAL Macro, Which Reduces Branching of Decompress Variants

6 years agoTotally Hide/Disable X2 Variants when HUF_DECOMPRESS_MINIMAL is Defined
W. Felix Handte [Fri, 16 Nov 2018 23:30:49 +0000 (15:30 -0800)] 
Totally Hide/Disable X2 Variants when HUF_DECOMPRESS_MINIMAL is Defined

6 years agoLoad Dictionaries as X1 Tables
W. Felix Handte [Fri, 16 Nov 2018 23:28:53 +0000 (15:28 -0800)] 
Load Dictionaries as X1 Tables

6 years agoAdd HUF_DECOMPRESS_MINIMAL Macro, Which Avoids Using X2 Variants
W. Felix Handte [Fri, 16 Nov 2018 23:01:50 +0000 (15:01 -0800)] 
Add HUF_DECOMPRESS_MINIMAL Macro, Which Avoids Using X2 Variants

6 years agobtultra2 and very small srcSize
Yann Collet [Tue, 18 Dec 2018 20:32:58 +0000 (12:32 -0800)] 
btultra2 and very small srcSize

When srcSize is small,
the nb of symbols produced is likely too small to warrant dedicated probability tables.
In which case, predefined distribution tables will be used instead.

There is a cheap algorithm in btultra initialization :
it presumes default distribution will be used if srcSize <= 1024.

btultra2 now uses the same threshold to shut down probability estimation,
since measured frequencies won't be used at entropy stage,
and therefore relying on them to determine sequence cost is misleading,
resulting in worse compression ratios.

This fixes btultra2 performance issue on very small input.

Note that, a proper way should be
to determine which symbol is going to use predefined probaility
and which symbol is going to use dynamic ones.
But the current algorithm is unable to make a "per-symbol" decision.
So this will require significant modifications.

6 years agoMerge pull request #1449 from facebook/ovlog_def
Yann Collet [Tue, 18 Dec 2018 17:45:53 +0000 (09:45 -0800)] 
Merge pull request #1449 from facebook/ovlog_def

overlapLog default values

6 years agoMerge pull request #1456 from yijinfb/example-ZSTD_compressCCtx
Yann Collet [Tue, 18 Dec 2018 17:24:18 +0000 (09:24 -0800)] 
Merge pull request #1456 from yijinfb/example-ZSTD_compressCCtx

Add multiple_simple_compression.c (demonstrates the use of ZSTD_compressCCtx(...)) to examples directory.

6 years agobreak loadFile_orDie() into 2: loadFile_orDie() loads file into a pre-allocated memor... 1456/head
Yi Jin [Tue, 18 Dec 2018 00:54:55 +0000 (16:54 -0800)] 
break loadFile_orDie() into 2: loadFile_orDie() loads file into a pre-allocated memory buffer, mallocAndLoadFile_orDie() allocates memory first, then calls loadFile_orDie()

6 years agoplay around with rescale weights
Yann Collet [Mon, 17 Dec 2018 23:48:34 +0000 (15:48 -0800)] 
play around with rescale weights

6 years agobug fix in loadFile_orDie(): exit with error code if filesize is bigger than provided...
Yi Jin [Mon, 17 Dec 2018 06:44:27 +0000 (22:44 -0800)] 
bug fix in loadFile_orDie(): exit with error code if filesize is bigger than provided buffer

6 years agocomment out printf() to make output terse
Yi Jin [Mon, 17 Dec 2018 05:27:52 +0000 (21:27 -0800)] 
comment out printf() to make output terse

6 years agoedit README.md and remove simple_compressionCCtx.c
Yi Jin [Mon, 17 Dec 2018 05:09:21 +0000 (21:09 -0800)] 
edit README.md and remove simple_compressionCCtx.c