Yann Collet
d7ad99b2ab
Merge branch 'longRangeMatcher' into dev
2017-08-31 18:08:37 -07:00
Stella Lau
c88fb9267f
Replace 'byReference' with enum
2017-08-29 11:55:02 -07:00
Yann Collet
32fb407c9d
updated a bunch of headers
...
for the new license
2017-08-18 16:52:05 -07:00
Yann Collet
2dbcfc6994
Merge pull request #794 from terrelln/force-inline
...
[libzstd] Fix FORCE_INLINE macro
2017-08-15 12:03:44 -07:00
Nick Terrell
565e925eb7
[libzstd] Fix FORCE_INLINE macro
2017-08-14 21:12:05 -07:00
Roman Gershman
b9d4f4fb74
Fix ZSTD_estimateDStreamSize function after ZSTD_DStream and ZSTD_DCtx were merged
2017-08-13 13:29:42 +03:00
Nick Terrell
9ba97182d1
[CI] Add gcc7build test
2017-08-08 13:28:56 -07:00
Yann Collet
2bd6440be0
pinned down error code enum values
...
Note : all error codes are changed by this new version,
but it's expected to be the last change for existing codes.
Codes are now grouped by category, and receive a manually attributed value.
The objective is to guarantee that
error code values will not change in the future
when introducing new codes.
Intentionnal empty spaces and ranges are defined
in order to keep room for potential new codes.
2017-07-13 17:12:16 -07:00
Nick Terrell
de0414b736
[libzstd] Pull CTables into sub-structure
2017-07-12 19:49:19 -07:00
Yann Collet
0f4fc6c20a
fixed several conversion warnings
2017-07-07 17:13:12 -07:00
Yann Collet
9bde061a0b
fixed minor Visual compilation limitation
2017-07-07 16:14:17 -07:00
Yann Collet
593d517ebf
fixed minor cast warning
2017-07-07 16:09:47 -07:00
Yann Collet
ead4dd48f6
new field frameHeader.headerSize
2017-07-07 15:51:24 -07:00
Yann Collet
46396523c0
ZSTD_getFrameHeader : control of windowSize limits is delegated to caller
...
Extracting frame header is a separate operation.
It's now possible to get frame header, whatever the window size set in it.
2017-07-07 15:32:12 -07:00
Yann Collet
990449b89d
new field : ZSTD_frameHeader.frameType
...
Makes frame type (zstd,skippable) detection more straighforward.
ZSTD_getFrameHeader set frameContentSize=ZSTD_CONTENTSIZE_UNKNOWN to mean "field not present"
2017-07-07 15:21:35 -07:00
Yann Collet
e622330a3b
extended frameHeader.windowSize to unsigned long long
2017-07-07 14:19:01 -07:00
Yann Collet
f04deff4fc
fixed #718 , reported by @GregSlazinski, solution suggested by @mcmilk
2017-07-06 01:42:46 -07:00
Yann Collet
d75c0e71c4
minor code refactoring
2017-07-05 18:10:07 -07:00
Yann Collet
5051dd39ca
Merge pull request #743 from facebook/fullbench
...
compress_generic() automatic optimization opportunities
2017-07-03 21:26:38 -07:00
Nick Terrell
c80fc50a8d
[libzstd] Fix memcpy() on potential NULL source
...
* `ZSTD_decompressStream_generic()` `ip` may be `NULL` for one of the calls
to `memcpy()`
* Assert the source is not `NULL` for calls to `memcpy()` where I believe
the source should not be `NULL`.
2017-07-03 12:31:55 -07:00
Yann Collet
2485f88bf8
fixed legacy version init bug
2017-07-01 09:09:34 -07:00
Yann Collet
7f40bb1c39
Merge pull request #742 from stellamplau/stack-space
...
Reduce stack usage of HUF_readDTableX4 and HUF_readDTableX2
2017-06-30 14:50:23 -07:00
Stella Lau
99e315999c
Reduce stack usage of HUF_readDTableX4 and HUF_readDTableX2
2017-06-29 11:49:59 -07:00
Yann Collet
33a6639039
fixed ZSTD_refPrefix with Multithread-enabled CCtx
2017-06-28 11:09:43 -07:00
Yann Collet
7d3816183f
exposed ZSTD_MAGIC_DICTIONARY in zstd.h
...
makes it easier to explain ZSTD_dictMode
2017-06-27 13:50:34 -07:00
Yann Collet
c7fb884eea
fixed minor conversion warning
2017-06-26 18:02:23 -07:00
Yann Collet
dde10b23fe
refactored ZSTD_estimateDStreamSize()
...
now uses windowSize as argument.
Also : created ZSTD_estimateDStreamSize_fromFrame()
2017-06-26 17:44:26 -07:00
Yann Collet
ef269c1b68
Merge pull request #725 from facebook/advancedAPI2
...
New Advanced API
2017-06-23 09:50:47 -07:00
Yann Collet
dce789281b
fixed : decompression of skippable frames in streaming mode
2017-06-21 15:53:42 -07:00
Yann Collet
1e4129b27b
fixed dangling pointer risk, detected by @terrelln
2017-06-21 13:26:10 -07:00
Yann Collet
e51d51bdf7
fixed memcpy() overlap
2017-06-20 17:44:55 -07:00
Yann Collet
c3bce24ef4
fixed potential dangling pointer, detected by @terrelln
2017-06-20 16:09:11 -07:00
Yann Collet
695a0a3449
fixed IA64 compilation error, by @mcmilk
2017-06-19 15:27:30 -07:00
Paul Cruz
a9b77c83e5
cleaning up code for analyzing frames
2017-06-15 14:13:28 -07:00
Yann Collet
58e8d793e1
made debug definitions common within zstd_internal.h
2017-06-02 18:20:48 -07:00
Yann Collet
8ddf4c22d5
fixed missing initialization
2017-06-02 17:16:49 -07:00
Yann Collet
33a7e679e5
significant zlib wrapper code refactoring
...
code indentation
variable scope and names
constify
Only coding style changes.
The logic should remain the same.
2017-06-02 17:10:49 -07:00
Yann Collet
4effccbf56
zlib_wrapper's uncompress() uses ZSTD_isFrame() for routing
...
more generic and safer than using own routing for magic number comparison
2017-06-02 14:27:11 -07:00
Yann Collet
ae728a43b8
removed defaultCustomMem
...
now ZSTD_customCMem is promoted as new default.
Advantages : ZSTD_customCMem = { NULL, NULL, NULL},
so it's natural default after a memset.
ZSTD_customCMem is public constant
(defaultCustomMem was private only).
Also : makes it possible to introduce ZSTD_calloc(),
which can now default to stdlib's calloc()
when it detects system default.
Fixed zlibwrapper which depended on defaultCustomMem.
2017-05-30 17:11:39 -07:00
Yann Collet
b8136f019a
static dctx is incompatible with legacy support
...
documented, and runtime tested
2017-05-27 00:03:08 -07:00
Yann Collet
cdf7e82222
Added ZSTD_initStaticCDict()
2017-05-25 18:05:49 -07:00
Yann Collet
57827f906f
added ZSTD_initStaticDDict()
2017-05-25 15:44:06 -07:00
Yann Collet
25989e361c
updated ZSTD_estimate?DictSize() to pass parameter byReference
...
resulting ?Dict object is smaller when created byReference.
Seems better than a documentation note.
2017-05-25 15:07:37 -07:00
Yann Collet
0fdc71c3dc
added ZSTD_initStaticDCtx()
2017-05-24 17:41:41 -07:00
Yann Collet
ba183005d3
merged DStream's inBuff and outBuff into a single buffer
...
Saves one malloc().
Also : makes it easier to implement static allocation
2017-05-24 15:42:24 -07:00
Nick Terrell
55fc1f91fd
[zstd] Fix up formatting edge cases for clang-format
2017-05-24 13:50:10 -07:00
Yann Collet
2e4db3e531
fixed performance regression with ZSTD_decompress() on small files
...
memset() was a quick fix to initialization problems,
but initialize too much space (tables, buffers)
which show up in decompression speed of ZSTD_decompress()
since it needs to recreate DCtx at each invocation.
Fixed by only initialization relevant pointers and size fields.
2017-05-24 13:15:19 -07:00
Yann Collet
11ea2f7fda
Merged ZSTD_DCtx and ZSTD_DStream objects
...
They are now the same object.
It's recommended to keep both types in source code
as previous versions of library (<v1.3.0)
still need this differentiation.
2017-05-23 16:19:43 -07:00
Yann Collet
fa3671eac7
changed ZSTD_BLOCKSIZE_ABSOLUTEMAX into ZSTD_BLOCKSIZE_MAX
...
Also :
change ZSTD_getBlockSizeMax() into ZSTD_getBlockSize()
created ZSTD_BLOCKSIZELOG_MAX
2017-05-19 10:51:30 -07:00
Yann Collet
7101434ec9
pedantic : added one error check
...
on a function which (today) never fails.
But who knows, maybe tomorrow ...
2017-05-16 16:28:24 -07:00