zstd/lib/compress
Yann Collet e3c42c739b clean ZSTD_compress() initialization
The (pretty old) code inside ZSTD_compress()
was making some pretty bold assumptions
on what's inside a CCtx and how to init it.

This is pretty fragile by design.
CCtx content evolve.
Knowledge of how to handle that should be concentrate in one place.

A side effect of this strategy
is that ZSTD_compress() wouldn't check for BMI2 capability,
and is therefore missing out some potential speed opportunity.

This patch makes ZSTD_compress() use
the same initialization and release functions
as the normal creator / destructor ones.

Measured on my laptop, with a custom version of bench
manually modified to use ZSTD_compress() (instead of the advanced API) :
This patch :
 1#silesia.tar       : 211984896 ->  73651053 (2.878), 312.2 MB/s , 723.8 MB/s
 2#silesia.tar       : 211984896 ->  70163650 (3.021), 226.2 MB/s , 649.8 MB/s
 3#silesia.tar       : 211984896 ->  66996749 (3.164), 169.4 MB/s , 636.7 MB/s
 4#silesia.tar       : 211984896 ->  65998319 (3.212), 136.7 MB/s , 619.2 MB/s
dev branch :
 1#silesia.tar       : 211984896 ->  73651053 (2.878), 291.7 MB/s , 727.5 MB/s
 2#silesia.tar       : 211984896 ->  70163650 (3.021), 216.2 MB/s , 655.7 MB/s
 3#silesia.tar       : 211984896 ->  66996749 (3.164), 162.2 MB/s , 633.1 MB/s
 4#silesia.tar       : 211984896 ->  65998319 (3.212), 130.6 MB/s , 618.6 MB/s
2018-06-07 14:05:25 -07:00
..
fse_compress.c fix corner case when requiring cost of an FSE symbol 2018-05-24 13:59:11 -07:00
huf_compress.c pass entropy tables to optimal parser 2018-05-08 15:37:06 -07:00
zstd_compress_internal.h Fixed a nasty corruption bug 2018-06-01 18:54:34 -07:00
zstd_compress.c clean ZSTD_compress() initialization 2018-06-07 14:05:25 -07:00
zstd_double_fast.c changed a few variable names 2018-06-04 17:10:50 -07:00
zstd_double_fast.h Skeleton for In-Place Impl for ZSTD_dfast 2018-05-25 13:13:28 -04:00
zstd_fast.c changed a few variable names 2018-06-04 17:10:50 -07:00
zstd_fast.h Coalesce hasDictMatchState and extDict Checks into One Enum and Rename Stuff 2018-05-23 17:53:03 -04:00
zstd_lazy.c Split the window state into substructure 2018-02-26 13:29:57 -08:00
zstd_lazy.h Split ZSTD_CCtx into smaller sub-structures 2018-01-16 11:17:50 -08:00
zstd_ldm.c Merge branch 'dev' into staticDictCost 2018-05-24 16:21:02 -07:00
zstd_ldm.h Coalesce hasDictMatchState and extDict Checks into One Enum and Rename Stuff 2018-05-23 17:53:03 -04:00
zstd_opt.c minor update of literal cost function 2018-05-29 15:34:50 -07:00
zstd_opt.h Split ZSTD_CCtx into smaller sub-structures 2018-01-16 11:17:50 -08:00
zstdmt_compress.c Only load extra table positions for CDicts 2018-04-02 14:41:30 -07:00
zstdmt_compress.h Merge branch 'dev' into advancedDecompress 2018-03-21 06:08:28 -07:00