Sen Huang
7ce891870c
Fix merge conflicts
2019-11-05 15:51:25 -05:00
Nick Terrell
60205fec02
Fix 2 bugs in dictionary loading
...
* Silently skip dictionaries less than 8 bytes, unless using `ZSTD_dct_fullDict`.
This changes the compressor, which silently skips dictionaries <= 8 bytes.
* Allow repcodes that are equal to the dictionary content size, since it is in bounds.
2019-11-01 16:52:07 -07:00
Sen Huang
b9ede1c8c2
Make sure contentsize is known
2019-10-30 16:03:58 -04:00
Yann Collet
a9a216a846
Merge pull request #1824 from senhuang42/new_path_for_cdict
...
Avoid using CDict params when input is large.
2019-10-23 12:04:40 -07:00
Yann Collet
5d5c895b18
fix initCStream_advanced() for fast strategies
...
Compression ratio of fast strategies (levels 1 & 2)
was seriously reduced, due to accidental disabling of Literals compression.
Credit to @QrczakMK, which perfectly described the issue, and implementation details,
making the fix straightforward.
Example : initCStream with level 1 on synthetic sample P50 :
Before : 5,273,976 bytes
After : 3,154,678 bytes
ZSTD_compress (for comparison) : 3,154,550
Fix #1787 .
To follow : refactor the test which was supposed to catch this issue (and failed)
2019-10-22 15:01:38 -07:00
Sen Huang
c2e1e54f24
((x or y) or z) == (x or y or z), remove brackets
2019-10-21 19:16:50 -04:00
Sen Huang
0c00455ea6
Merge branch 'dev' of github.com:senhuang42/zstd into new_path_for_cdict
2019-10-21 19:06:51 -04:00
Sen Huang
5b2f4ac1a8
merge
2019-10-21 19:02:52 -04:00
Sen Huang
2ab484a5f9
Fix bad merge
2019-10-21 18:55:17 -04:00
Sen Huang
b6c3459d50
merge
2019-10-21 18:46:17 -04:00
Sen Huang
676f89902a
Added multiplier, renamed new enum to something more useful
2019-10-21 15:36:12 -04:00
Sen Huang
1f3a51fb52
Updated forceAttachDict param bounds
2019-10-21 15:36:12 -04:00
Sen Huang
8f69c47643
Add enum to decision process
2019-10-21 15:36:12 -04:00
Sen Huang
e4de8b098a
Added support for forcing new CDict behavior and updated enum
2019-10-21 15:36:12 -04:00
Sen Huang
9294f4826b
Changed to int from BYTE
2019-10-21 15:36:12 -04:00
Sen Huang
f0fccc8847
Changed to int from BYTE
2019-10-21 15:36:12 -04:00
Sen Huang
bb2df8c499
Trailing whitespace
2019-10-21 15:36:12 -04:00
Sen Huang
cf51501d2f
Fix test
2019-10-21 15:36:12 -04:00
Sen Huang
ea3cb6988f
Cast to BYTE to appease appveyor
2019-10-21 15:36:12 -04:00
Sen Huang
a727a85a7e
merge conflicts round 2
2019-10-21 15:36:12 -04:00
Sen Huang
053a35fd64
formatting
2019-10-21 15:35:33 -04:00
Sen Huang
3fa4daaa55
Fix error
2019-10-21 15:35:33 -04:00
Sen Huang
3328348c63
Add compressionlevel to cdict
2019-10-21 15:32:39 -04:00
Felix Handte
cf725630a6
Merge pull request #1795 from felixhandte/workspace-asan
...
Add Poisoned Redzones to the Workspace When Compiling with ASAN
2019-10-21 12:15:17 -04:00
Sen Huang
e8aa3e486d
Updated forceAttachDict param bounds
2019-10-20 22:01:08 -04:00
Sen Huang
6d297265f9
Add enum to decision process
2019-10-20 19:02:47 -04:00
Sen Huang
1daa898c93
Added support for forcing new CDict behavior and updated enum
2019-10-20 14:03:09 -04:00
Yann Collet
6323966e53
updated erroneous comments using ZSTD_dm_*
...
instead of the current ZSTD_dct_*,
reported by @nigeltao (#1822 )
2019-10-16 16:14:04 -07:00
Sen Huang
4455f00cb8
Changed to int from BYTE
2019-10-16 15:06:02 -04:00
Sen Huang
4f7d26b0ee
Changed to int from BYTE
2019-10-16 15:05:29 -04:00
Sen Huang
cf00ea367a
Trailing whitespace
2019-10-16 10:31:27 -04:00
Sen Huang
8cb2174446
Fix test
2019-10-16 10:29:31 -04:00
Sen Huang
5e901b6f32
Cast to BYTE to appease appveyor
2019-10-15 13:58:44 -04:00
Sen Huang
5c010c9d2d
merge conflicts round 2
2019-10-15 13:10:05 -04:00
Sen Huang
a06b51879c
merge conflict
2019-10-15 12:58:50 -04:00
Sen Huang
23dac23a49
formatting
2019-10-15 12:44:48 -04:00
Sen Huang
0c8df5c928
Fix error
2019-10-15 12:28:23 -04:00
Sen Huang
a65eb39f9d
Add compressionlevel to cdict
2019-10-15 10:22:06 -04:00
W. Felix Handte
ede31da2ea
Fix CCtx Size Estimation
2019-10-10 15:02:08 -04:00
W. Felix Handte
2c80a9f8ac
Check if CCtx in Workspace after Null Check
2019-10-10 13:40:16 -04:00
W. Felix Handte
0ffae7e440
Stop Allocating Extra Space for Table Redzones
2019-10-10 13:40:16 -04:00
W. Felix Handte
0cc481ef66
Fix Workspace Size Calculation
2019-10-10 13:40:16 -04:00
W. Felix Handte
b6c0a02a17
Fix ZSTD_sizeof_matchState() Calculation
2019-10-10 13:40:16 -04:00
W. Felix Handte
ef0b5707c5
Refactor Freeing CCtxes / CDicts Inside Workspaces
2019-10-10 13:40:16 -04:00
W. Felix Handte
19a0955ec9
Add ZSTD_cwksp_alloc_size()
to Help Calculate Needed Workspace Size
2019-10-10 13:40:16 -04:00
W. Felix Handte
da88c35d41
Stop Assuming Tables are Adjacent
2019-10-10 13:40:16 -04:00
Bimba Shrestha
36528b96c4
Manually moving instead of memcpy on decoder and using genBuffer()
2019-10-03 09:26:51 -07:00
Bimba Shrestha
61ec4c2e7f
Cleaning sequence parsing logic
2019-10-03 06:42:40 -07:00
Bimba Shrestha
c04245b257
Replacing assert with memory_allocation error code throw
2019-09-23 15:42:16 -07:00
Bimba Shrestha
be0bebd24e
Adding test and null check for malloc
2019-09-23 15:08:18 -07:00