Commit Graph

3446 Commits (466f92eaa643271ec1b537bc11e47bda5c96c121)

Author SHA1 Message Date
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 009d604e00 ZSTD_compress_generic() supports multiple successive frames
also : clarified streaming API implementation
2017-05-19 10:17:59 -07:00
Yann Collet 6d4fef36de Added ZSTD_compress_generic()
Used in fileio.c (zstd cli).
Need to set macro ZSTD_NEWAPI to trigger it.
2017-05-17 18:36:15 -07:00
Nick Terrell ddc68e174b [linux-kernel] Fix a weird clang-format corner case 2017-05-17 15:06:41 -07:00
Nick Terrell a2b21c552f [linux-kernel] Update tests Makefile 2017-05-17 14:56:37 -07:00
Nick Terrell 8d8e65c6c3 [linux-kernel] Update zstd.diff 2017-05-17 14:52:12 -07:00
Nick Terrell 06fa1b0560 [linux-kernel] Move ZSTD_STATIC_ASSERT to zstd_internal.h 2017-05-17 14:51:50 -07:00
Nick Terrell 67101c6c77 [linux-kernel] clang-format lib/zstd/ 2017-05-17 14:40:46 -07:00
Nick Terrell 588579f3a1 [linux-kernel] Rename MEM_* functions to ZSTD_* 2017-05-17 14:39:57 -07:00
Nick Terrell 581e5fbe83 Add clang-format config 2017-05-17 13:49:19 -07:00
Nick Terrell d1a5790f8e [linux-kernel] Dual license with GPLv2 2017-05-17 12:08:15 -07:00
Yann Collet 23c256e44b removed useless variable from CCtx
CStream's pledgedSrcSize is no longer necessary
srcSize control is realized within bufferless interface.
2017-05-16 18:10:11 -07:00
Yann Collet 906a8f269a Merge branch 'dev' into advancedAPI2 2017-05-16 17:33:08 -07:00
Yann Collet e12ae02357 minor coding style update
reduced some long lines
2017-05-16 17:32:33 -07:00
Yann Collet 9f95e445ab minor comment clarifications 2017-05-16 17:26:43 -07:00
Nick Terrell fb10c91b4f [linux-kernel] Update zstd.diff 2017-05-16 17:21:22 -07:00
Nick Terrell 358280f107 Remove cross-platform macros and dead code 2017-05-16 17:16:00 -07:00
Nick Terrell 8eb7a32527 [linux-kernel] Fix whitespace edge case with script 2017-05-16 16:55:52 -07:00
Nick Terrell 0ce0782c97 [linux-kernel] Update kernelize.sh script for edge cases 2017-05-16 16:55:03 -07:00
Nick Terrell 0d26da2f25 [linux-kernel] Don't undef current (use curr) 2017-05-16 16:48:58 -07:00
Yann Collet 0bdb575c31 Merge branch 'dev' into advancedAPI2 2017-05-16 16:32:29 -07:00
Yann Collet 392073ba80 Merge pull request #702 from facebook/newPrototype
added prototype ZSTD_decompressBegin_usingDDict() (#700)
2017-05-17 01:32:10 +02: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
Yann Collet ac4b4d0c44 Merge pull request #701 from terrelln/lk-xxh
[linux-kernel] Separate xxhash into its own module
2017-05-17 01:18:10 +02:00
Nick Terrell f3c9bd014c [linux-kernel] Remove unused variables in test 2017-05-16 16:13:51 -07:00
Yann Collet bfff8999c5 added prototype ZSTD_versionString() 2017-05-16 16:12:23 -07:00
Nick Terrell 90a1c94965 [linux-kernel] Update header comments 2017-05-16 16:10:17 -07:00
Yann Collet 4eff8136aa added prototype ZSTD_decompressBegin_usingDDict (#700) 2017-05-16 16:05:27 -07:00
Nick Terrell 1d42ca8f6d Add zstd.diff 2017-05-16 16:02:05 -07:00
Nick Terrell b3ebe9b77c [linux-kernel] Separate xxhash into its own module 2017-05-16 15:52:35 -07:00
Yann Collet 2d4d31c18a removed gcc compilation flag -Wbad-function-cast
It makes it more difficult to directly cast the result of a function,
requiring to store the result in an intermediate variable.
It does not necessarily help readability,
and this restriction can be difficult to overcome in some constructions,
like some macros.

also : fixed minor Visual conversion warnings in datagencli.c
2017-05-16 11:34:38 -07:00
Yann Collet 46ac9ade9b fixed vla warning on linux 2017-05-15 18:15:08 -07:00
Yann Collet 133f0aee54 fixed redundant declarations in legacy v0.5 and v0.7 decoders
triggered by new flag -Wredundant-decls
2017-05-15 17:44:04 -07:00
Yann Collet 83d0c764dc added several compilation flags 2017-05-15 17:15:46 -07:00
Yann Collet a5ffe3d370 pushed enum values for strategy by one (ZSTD_fast==1)
this makes it possible to use `0` to mean:
"do not change strategy"
2017-05-12 16:29:19 -07:00
Yann Collet add66f816d changed macro LOADCPARAMS by static function ZSTD_cLevelToCParams()
for improved compiler checks.
Also : ensure most parameters can receive value "0"
to mean "do not change".
2017-05-12 16:01:15 -07:00
Yann Collet b0edb7fb0e added ZSTD_CCtx_setParameter() 2017-05-12 15:31:53 -07:00
Yann Collet ef738c1b23 better error code when compressing using NULL CDict
which is not allowed (but detected, and generates an error).
2017-05-12 13:55:25 -07:00
Yann Collet db8e21d5a0 made ZSTD_compress_generic() definition accessible
note that the implementation is not done yet.
2017-05-12 13:46:49 -07:00
Yann Collet 33eb7ac6b6 updated Advanced API proposal
only declarations in zstd.h
2017-05-12 12:36:11 -07:00
Yann Collet bd1964a988 Merge pull request #696 from joscollin/wip-lib-legacy-fallthrough-warn
lib/legacy: warning: this statement may fall through
2017-05-11 10:45:01 -07:00
Yann Collet 4c1cfc0bb6 Merge pull request #695 from joscollin/wip-lib-compress-fallthrough-warn
lib/compress: warning: this statement may fall through
2017-05-11 10:44:27 -07:00
Yann Collet ed25fb709e Merge pull request #690 from joscollin/wip-lib-common-fallthrough-warning
lib/common: warning: this statement may fall through
2017-05-11 10:43:45 -07:00
Jos Collin 280510f2d5 lib/legacy: warning: this statement may fall through
The following warning appears during build at sevaral places.

../lib/legacy/zstd_v04.c:819:40: warning: this statement may fall through [-Wimplicit-fallthrough=]
             case 7: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[6]) << (sizeof(size_t)*8 - 16);

../lib/legacy/zstd_v05.c:821:40: warning: this statement may fall through [-Wimplicit-fallthrough=]
             case 7: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[6]) << (sizeof(size_t)*8 - 16);

../lib/legacy/zstd_v06.c:913:40: warning: this statement may fall through [-Wimplicit-fallthrough=]
             case 7: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[6]) << (sizeof(bitD->bitContainer)*8 - 16);

../lib/legacy/zstd_v07.c:583:40: warning: this statement may fall through [-Wimplicit-fallthrough=]
             case 7: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[6]) <<
             (sizeof(bitD->bitContainer)*8 - 16);

Signed-off-by: Jos Collin <jcollin@redhat.com>
2017-05-11 14:27:40 +05:30
Jos Collin 7cd7a7564b lib/compress: warning: this statement may fall through
The following warning appears during build.

../lib/compress/huf_compress.c: In function ‘HUF_compress1X_usingCTable’:
../lib/compress/huf_compress.c:444:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
     if (sizeof((stream)->bitContainer)*8 < HUF_TABLELOG_MAX*4+7) HUF_FLUSHBITS(stream)
        ^
../lib/compress/huf_compress.c:465:18: note: in expansion of macro ‘HUF_FLUSHBITS_2’
                  HUF_FLUSHBITS_2(&bitC);
                  ^~~~~~~~~~~~~~~
../lib/compress/huf_compress.c:466:9: note: here
         case 2 : HUF_encodeSymbol(&bitC, ip[n+ 1], CTable);

../lib/compress/zstd_compress.c: In function ‘ZSTD_compressStream_generic’:
../lib/compress/zstd_compress.c:3366:34: warning: this statement may fall through [-Wimplicit-fallthrough=]
                 zcs->streamStage = zcss_flush;   /* pass-through to flush stage */
                 ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
../lib/compress/zstd_compress.c:3369:9: note: here
         case zcss_flush:

Signed-off-by: Jos Collin <jcollin@redhat.com>
2017-05-11 13:17:26 +05:30
Jos Collin 05286fdd5a lib/common: warning: this statement may fall through
The following warning appears during the build. Fixed the review comments too.

zstd/lib/common/bitstream.h: In function ‘BIT_initDStream’:
zstd/lib/common/bitstream.h:277:33: warning: this statement may fall through [-Wimplicit-fallthrough=]
      case 7: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[6]) <<
      (sizeof(bitD->bitContainer)*8 - 16);

Signed-off-by: Jos Collin <jcollin@redhat.com>
2017-05-11 09:10:02 +05:30
Yann Collet a8ced49db3 Merge pull request #692 from terrelln/btopt
Rename ZSTD_btopt2 to ZSTD_btultra
2017-05-10 18:46:48 -07:00
Nick Terrell 374f868354 Update whitespace 2017-05-10 17:48:42 -07:00
Nick Terrell a99ece9e79 Update zstd.1.md to use btultra 2017-05-10 16:51:18 -07:00
Nick Terrell 5f2c7213c7 Merge remote-tracking branch 'upstream/dev' into btopt
* upstream/dev: (305 commits)
  added test for ZSTD_estimateCStreamSize()
  changed variable name, for clarity
  fixed ZSTD_estimateCStreamSize()
  shortened ZSTD_createCStream_Advanced()
  fixed symbols test
  added ZSTD_estimateDStreamSize()
  changed name frameParams into frameHeader
  regroup memory usage function declarations
  separated ZSTD_estimateCStreamSize() from ZSTD_estimateCCtxSize()
  bumped version number
  added ZSTD_estimateCDictSize() and ZSTD_estimateDDictSize()
  Updated ZSTD_freeCCtx()
  updated ZSTD_estimateCCtxSize()
  Updated ZSTD_sizeof_CCtx()
  merged CCtx and CStream as a single same object
  cli : -d and -t do not stop after a failed decompression
  added dev branch CircleCI badge
  added dev branch Appveyor badge
  keep dev branch status only
  creates a binary archive without the `programs` directory
  ...
2017-05-10 16:49:58 -07:00