zstd/lib/compress
Nick Terrell 7083f79008 [bug] Fix dictContentType when reprocessing cdict
Conditions to trigger:
* CDict is loaded as raw content.
* CDict starts with the zstd dictionary magic number.
* The CDict is reprocessed (not attached or copied).
* The new API is used (streaming or `ZSTD_compress2()`).

Bug: The dictionary is loaded as a zstd dictionary, not a raw content
dictionary, because the dict content type is set to `ZSTD_dct_auto`.

Fix: Pass in the dictionary content type from cdict creation to the call
to `ZSTD_compress_insertDictionary()`.

Test: Added a test case that exposes the bug, and fixed the raw
content tests to not modify the `dictBuffer`, which makes all future
tests with the `dictBuffer` raw content, which doesn't seem intentional.
2020-10-12 12:46:10 -07:00
..
fse_compress.c [lib] Add ZSTD_NO_UNUSED_FUNCTIONS macro to hide unused functions 2020-09-09 14:35:39 -07:00
hist.c [lib] Add ZSTD_NO_UNUSED_FUNCTIONS macro to hide unused functions 2020-09-09 14:35:39 -07:00
hist.h Move standard includes to zstd_deps.h 2020-08-26 12:25:08 -07:00
huf_compress.c [lib] Add ZSTD_NO_UNUSED_FUNCTIONS macro to hide unused functions 2020-09-09 14:35:39 -07:00
zstd_compress_internal.h Merge pull request #2328 from marxin/zstd-pool-api 2020-10-09 01:00:50 -07:00
zstd_compress_literals.c ZSTD_ prefix mem{cpy,move,set},malloc,calloc,free 2020-08-26 12:26:03 -07:00
zstd_compress_literals.h Fix copyright and license lines 2020-03-26 17:02:06 -07:00
zstd_compress_sequences.c [lib] Reduce zstd stack usage by 1KB 2020-09-09 14:35:39 -07:00
zstd_compress_sequences.h Rewrite Include Paths to be Relative 2020-05-04 15:20:26 -04:00
zstd_compress_superblock.c [superblock] Reduce stack usage by correctly sizing header buffers 2020-09-24 19:42:04 -07:00
zstd_compress_superblock.h Rewrite Include Paths to be Relative 2020-05-04 15:20:26 -04:00
zstd_compress.c [bug] Fix dictContentType when reprocessing cdict 2020-10-12 12:46:10 -07:00
zstd_cwksp.h Allow user to override ASAN/MSAN detection 2020-09-24 19:42:04 -07:00
zstd_double_fast.c [lib] s/current/curr because it collides with Linux Kernel macro 2020-09-09 14:35:39 -07:00
zstd_double_fast.h Rewrite Include Paths to be Relative 2020-05-04 15:20:26 -04:00
zstd_fast.c [lib] s/current/curr because it collides with Linux Kernel macro 2020-09-09 14:35:39 -07:00
zstd_fast.h Rewrite Include Paths to be Relative 2020-05-04 15:20:26 -04:00
zstd_lazy.c Document searchFuncs Table 2020-09-10 22:10:02 -04:00
zstd_lazy.h Rename and Move DD_BLOG Constant to ZSTD_LAZY_DDSS_BUCKET_LOG 2020-09-10 18:51:52 -04:00
zstd_ldm.c [lib] s/current/curr because it collides with Linux Kernel macro 2020-09-09 14:35:39 -07:00
zstd_ldm.h Rewrite Include Paths to be Relative 2020-05-04 15:20:26 -04:00
zstd_opt.c [lib] s/current/curr because it collides with Linux Kernel macro 2020-09-09 14:35:39 -07:00
zstd_opt.h Fix copyright and license lines 2020-03-26 17:02:06 -07:00
zstdmt_compress.c Allow external creation of POOLs that can be shared. 2020-10-07 12:44:33 +02:00
zstdmt_compress.h Allow external creation of POOLs that can be shared. 2020-10-07 12:44:33 +02:00