Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
450feb0
[libzstd] Fix ZSTD_decompressBound() on bad skippable frames
terrelln Apr 17, 2019
09caa4d
[fuzzer] Add a fuzzer for frame info functions
terrelln Apr 17, 2019
5922f4e
[legacy] Return the right error code
terrelln Apr 17, 2019
ee130a9
[libzstd] Check the size in readSkippableFrameSize()
terrelln Apr 17, 2019
58bcc32
[fuzz] Add a seedcorpora target for oss-fuzz
terrelln Apr 17, 2019
af3531e
Merge pull request #1590 from terrelln/frame-info-fuzz
terrelln Apr 17, 2019
cc66900
[fuzzer] Size the decompression output buffer randomly
terrelln Apr 18, 2019
610a81e
[fuzzer] Compile with legacy support
terrelln Apr 18, 2019
ac098c7
[legacy] Fix a bug in ZSTDv06_findFrameSizeInfoLegacy()
terrelln Apr 18, 2019
579f3d7
[legacy] Fix bug in ZSTD_decodeSeqHeaders()
terrelln Apr 18, 2019
785331a
[paramgrill] Fix mingw build errors
terrelln Apr 18, 2019
a8db4bd
Merge pull request #1593 from terrelln/legacy-fix
terrelln Apr 18, 2019
2536771
[legacy] Fix Huffman jump table reads in v01 and v05
terrelln Apr 18, 2019
9ad7ea4
Merge pull request #1594 from terrelln/legacy-fix
terrelln Apr 19, 2019
0fd322f
[legacy] Fix ZSTDv0*_decodeSequence()
terrelln Apr 19, 2019
b758250
Merge pull request #1595 from terrelln/legacy-fix
terrelln Apr 19, 2019
a892e25
[libzstd] Error if all sequence bits aren't consumed
terrelln Apr 23, 2019
5f228f8
[libzstd] Add a ZSTD_STATIC_ASSERT for BIT_DStream_status
terrelln Apr 23, 2019
3d673f3
Merge pull request #1598 from terrelln/decode-seq
terrelln Apr 23, 2019
f837326
Fix #1591 - Not building on MinGW-W64
myzhang1029 Apr 24, 2019
585b5a1
Merge pull request #1600 from myzhang1029/long-tell
terrelln Apr 25, 2019
4107b73
meson: Update default project version
tesuji Apr 26, 2019
bee9e5f
fix test fail
sjnam Apr 27, 2019
c4a40db
set followLinks option true to cat, zcat and gzcat programs
vejnar Apr 27, 2019
9ef732f
Merge pull request #1603 from sjnam/examples-test-fail
terrelln Apr 29, 2019
3e1e49d
add test for zstdcat and zcat on symlink
vejnar Apr 29, 2019
69baaee
Merge pull request #1604 from vejnar/dev
terrelln Apr 30, 2019
5d900ff
meson: Error out if fail to extracted version number
tesuji Apr 30, 2019
f8178ec
Merge pull request #1602 from lzutao/meson
terrelln Apr 30, 2019
1d70bc3
meson: Enable testing in CI (#1609)
tesuji May 2, 2019
2953d45
[test] Fix poolTests deadlock and flakiness
terrelln May 2, 2019
81f1f76
[tests] Only sleep 10ms in poolTests
terrelln May 2, 2019
bfbef51
Merge pull request #1610 from terrelln/pool-test
terrelln May 2, 2019
23b5ee1
fileio: Disable BACKTRACE under uClibc
neheb May 6, 2019
b114477
Merge pull request #1613 from neheb/patch-1
terrelln May 7, 2019
cb47871
[dictBuilder] Be more specific than ERROR(generic) (#1616)
Tyler-Tran May 23, 2019
ff0be17
Build Manual
felixhandte May 24, 2019
61025d5
zstdgrep: Handle -f Flag
felixhandte May 24, 2019
6a06380
Add Test
felixhandte May 24, 2019
21bb78e
Merge pull request #1618 from felixhandte/zstgrep-f-flag
felixhandte May 25, 2019
3f5737a
CMake: Check for existing custom target 'uninstall'
May 26, 2019
1bc77ee
Skip --adapt and --rsyncable tests when built without thread support
michaelforney May 26, 2019
4baecdf
added comments to better understand enforceMaxDist()
Cyan4973 May 28, 2019
6453f81
complementary code comments
Cyan4973 May 28, 2019
327cf6f
nextToUpdate3 does not need to be maintained outside of zstd_opt.c
Cyan4973 May 28, 2019
33dabc8
get bt matches : made it a bit clearer which parameters are input and…
Cyan4973 May 28, 2019
9719fd6
removed nextToUpdate3 from ZSTD_window
Cyan4973 May 28, 2019
4c41494
fullbench can now select sample size with command `-B#`
Cyan4973 May 28, 2019
eb6b199
fullbench: added streaming with fresh CCtx scenario
Cyan4973 May 28, 2019
c630816
fullbench 43: ensure context is freed after each usage
Cyan4973 May 29, 2019
b84274d
Merge pull request #1622 from facebook/nextToUpdate3
Cyan4973 May 29, 2019
ed38b64
fullbench: pass proper parameters in scenario 43
Cyan4973 May 29, 2019
904d4da
fullbench : minor refactoring, for readability
Cyan4973 May 29, 2019
ab3625c
define CONTROL, to ensure check cannot be disabled
Cyan4973 May 29, 2019
78056a3
consistency : changed constant name to kSampleSizeDefault
Cyan4973 May 30, 2019
b13a920
Merge pull request #1623 from facebook/fullbench
Cyan4973 May 31, 2019
bc601bd
first implementation of small window size for btopt
Cyan4973 May 31, 2019
58adb10
extended exact window size to greedy/lazy modes
Cyan4973 May 31, 2019
a30feba
Made fast strategy compatible with new offset validation strategy
Cyan4973 May 31, 2019
d605f48
make double_fast compatible with new index invalidation strategy
Cyan4973 May 31, 2019
a968099
minor code cleaning for new index invalidation strategy
Cyan4973 May 31, 2019
fce4df3
fixed wrong assert in double_fast
Cyan4973 Jun 1, 2019
80d6cce
removed UINT32_MAX
Cyan4973 Jun 1, 2019
b31df04
add cmake lz4 support
LeeYoung624 Jun 3, 2019
5029ebc
zstdcli : exposing cpu load indicator for each file on -vv mode
ephiepark Jun 3, 2019
43d463e
zstdcli : moving start time and cpu initialization after potential pr…
ephiepark Jun 4, 2019
2841c79
zstdcli : fixing mixed declarations and code error
ephiepark Jun 4, 2019
5fe9742
zstdcli : moving cpu load calculation from FIO_compressFilename_dstFi…
ephiepark Jun 4, 2019
ef2c836
zstdcli : trying to fix declaration after statement
ephiepark Jun 4, 2019
a38601f
zstdcli : remove extra semicolon
ephiepark Jun 4, 2019
e498bb6
zstdcli : align output message with previous message
ephiepark Jun 4, 2019
b5c98fb
Added comments on I/O buffer sizes for streaming
Cyan4973 Jun 4, 2019
b3af187
better title formatting for html documentation
Cyan4973 Jun 4, 2019
a371df5
circleci : use custom docker image with installations
ephiepark Jun 4, 2019
a6a7f08
circleci : remove install dependencies command from config.yml
ephiepark Jun 4, 2019
61d912f
Merge pull request #1629 from facebook/streamSize
Cyan4973 Jun 4, 2019
c6ca65a
Merge pull request #1631 from ephiepark/dev
Cyan4973 Jun 4, 2019
f1bf281
Merge pull request #2 from ephiepark/circleci
ephiepark Jun 5, 2019
3e9572b
circleci : use custom docker image with installations
ephiepark Jun 4, 2019
c96535f
circleci : remove install dependencies command from config.yml
ephiepark Jun 4, 2019
286394a
Merge branch 'dev' of https://github.com/ephiepark/zstd into dev
ephiepark Jun 5, 2019
f46a360
Update README.md
yk-tanigawa Jun 5, 2019
015985c
Merge pull request #1633 from yk-tanigawa/patch-1
felixhandte Jun 5, 2019
c0eb6c9
Merge pull request #1632 from ephiepark/dev
Cyan4973 Jun 5, 2019
cdb9481
[libzstd] Optimize ZSTD_insertBt1() for repetitive data
terrelln Jun 6, 2019
f3800ba
[regression] Update results.csv
terrelln Jun 6, 2019
d06c15c
Merge pull request #1635 from terrelln/opt-opt
terrelln Jun 6, 2019
b878bd0
Clean Up Temp Files Produced By playTests.sh
felixhandte Jun 7, 2019
d2c4804
Switch Macro Guarding lstat()
felixhandte Jun 7, 2019
176a543
In VS2010+, turn off assembler output for libzstd & libzstd-dll, and …
Absotively Jun 7, 2019
3968160
[programs] set chmod 600 after opening destination file
chungy Jun 9, 2019
af80f6d
[programs] Don’t try to chmod a dst file if it can’t be opened
chungy Jun 9, 2019
e79dbb8
Merge pull request #1642 from Absotively/dev
felixhandte Jun 10, 2019
d897019
Add Contbuild Test for C99 Build
felixhandte Jun 10, 2019
6810dd6
[fuzz] Remove max_len from the options
terrelln Jun 10, 2019
c601622
Merge pull request #1619 from j301scott/dev
Cyan4973 Jun 10, 2019
bc400ed
Merge pull request #4 from facebook/dev
LeeYoung624 Jun 11, 2019
81276c4
Merge pull request #1646 from terrelln/oss-fuzz
terrelln Jun 11, 2019
344f942
Merge pull request #1620 from michaelforney/test-no-threads
felixhandte Jun 11, 2019
a4c0c27
Install zstdless & zstdgrep as 'PROGRAMS' in CMake
LeeYoung624 Jun 11, 2019
f547dca
Remove ZSTD_DLL_EXPORT=1 for static lib
scharan Jun 12, 2019
b059202
Merge pull request #1644 from chungy/chmod_600
Cyan4973 Jun 14, 2019
018df9c
Merge pull request #1650 from scharan/RemoveExportsForStaticLibrary
Cyan4973 Jun 15, 2019
9af909b
Merge pull request #1624 from facebook/smallwlog
Cyan4973 Jun 15, 2019
1166782
Merge pull request #1640 from felixhandte/lstat-macro-guard
Cyan4973 Jun 15, 2019
837ff9d
Merge pull request #1647 from LeeYoung624/cmake_bug_fix
Cyan4973 Jun 15, 2019
06d5e5f
[regression] Update results for small wlog patch PR#1624
terrelln Jun 17, 2019
aeb86b1
Merge pull request #1655 from terrelln/regression-test
terrelln Jun 17, 2019
b26818f
Merge pull request #1626 from LeeYoung624/dev
Cyan4973 Jun 19, 2019
95e2b43
[opt] Add asserts for corruption in ZSTD_updateTree()
terrelln Jun 21, 2019
4156060
[zstdmt] Update assert to use ZSTD_WINDOWLOG_MAX
terrelln Jun 21, 2019
674534a
[zstd] Fix data corruption in niche use case
terrelln Jun 21, 2019
944e2e9
benchfn : added macro macro CONTROL()
Cyan4973 Jun 21, 2019
45c9fbd
prefer memset() rather than reduceIndex() when close to index range l…
Cyan4973 Jun 21, 2019
8e16b87
[tests] Add tests for big dictionaries
terrelln Jun 22, 2019
9038579
Merge pull request #1659 from terrelln/big-dict
terrelln Jun 24, 2019
621adde
changed naming to ZSTD_indexTooCloseToMax()
Cyan4973 Jun 24, 2019
734eff7
enable repeat mode on rle
ephiepark Jun 26, 2019
c7c1ba3
Fix a constraint stricter than the spec
ephiepark Jun 26, 2019
36d0bc2
Merge pull request #5 from ephiepark/decodecorpus
ephiepark Jun 27, 2019
c55d2e7
Adding shrinking flag for cover and fastcover (#1656)
Tyler-Tran Jun 27, 2019
01e8384
Add test case for short bistream
ephiepark Jun 28, 2019
9f4d71f
Merge pull request #6 from ephiepark/decodecorpus
ephiepark Jun 28, 2019
4d15685
meson: Beautify travis config
tesuji Jun 28, 2019
8e590a1
meson: Fix deprecated build warnings on build options
tesuji Jun 28, 2019
132a1ad
meson: Always build gen_html on build machine
tesuji Jun 28, 2019
068cc18
Merge pull request #1665 from lzutao/meson-deprecated-warnings
Cyan4973 Jun 30, 2019
2830952
reflect code review comments
ephiepark Jul 1, 2019
01f5b5d
Merge pull request #7 from ephiepark/decodecorpus
ephiepark Jul 1, 2019
4d611ca
Merge pull request #1664 from ephiepark/dev
Cyan4973 Jul 1, 2019
857e608
Merge pull request #1658 from facebook/memset
Cyan4973 Jul 1, 2019
6c92ba7
ZSTD_compressSequences_internal assert op <= oend (#1667)
terrelln Jul 2, 2019
e962f07
[fuzz] Add a compression fuzzer with randomly sized output buffer (#1…
terrelln Jul 3, 2019
9007701
Adding targetCBlockSize param
ephiepark Jun 24, 2019
f57ac7b
Factor out the logic to build sequences
ephiepark Jun 24, 2019
096714d
Merge pull request #1671 from ephiepark/dev
Cyan4973 Jul 4, 2019
654cb9d
fix gitignore errors
LeeYoung624 Jul 9, 2019
b8ec4b0
updated version number (to v1.4.1)
Cyan4973 Jul 9, 2019
8eda16c
Merge pull request #1677 from LeeYoung624/gitignore_fix
Cyan4973 Jul 9, 2019
34a1a37
updated .gitignore rule
Cyan4973 Jul 9, 2019
2387d57
updated .gitignore
Cyan4973 Jul 9, 2019
b01c1c6
Merge pull request #1675 from ephiepark/dev
Cyan4973 Jul 10, 2019
d132773
updated double_fast complementary insertion
Cyan4973 Jul 11, 2019
812e8f2
perf improvements for zstd decode (#1668)
mgrice Jul 11, 2019
e8a7f5d
double-fast: changed the trade-off for a smaller positive change
Cyan4973 Jul 12, 2019
eaeb7f0
updated the _extDict variant of double fast
Cyan4973 Jul 12, 2019
75cfe1d
[ldm] Fix bug in overflow correction with large job size (#1678)
terrelln Jul 12, 2019
8fb08b6
Merge pull request #1681 from facebook/level3
Cyan4973 Jul 12, 2019
4c2943d
[regression] Update results for ZSTD_double_fast update
terrelln Jul 15, 2019
f7d5694
Merge pull request #1684 from terrelln/regression
terrelln Jul 15, 2019
c05b270
[doc] Remove Limitation that Compressed Block is Smaller than Uncompr…
felixhandte Jul 17, 2019
a2861d7
[doc] Bump Format Spec Version
felixhandte Jul 17, 2019
62a0dc5
Update CHANGELOG with v1.4.1 Changes
felixhandte Jul 19, 2019
d636cd1
Merge pull request #1692 from felixhandte/v1.4.1-changelog
Cyan4973 Jul 19, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 4 additions & 26 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,14 @@
version: 2

references:
# Install the dependencies required for tests.
# Add the step "- *install-dependencies" to the beginning of your job to run
# this command.
install-dependencies: &install-dependencies
run:
name: Install dependencies
# TODO: We can split these dependencies up by job to reduce installation
# time.
command: |
sudo dpkg --add-architecture i386
sudo apt-get -y -qq update
sudo apt-get -y install \
gcc-multilib-powerpc-linux-gnu gcc-arm-linux-gnueabi \
libc6-dev-armel-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
libc6-dev-ppc64-powerpc-cross zstd gzip coreutils \
libcurl4-openssl-dev

jobs:
# the first half of the jobs are in this test
short-tests-0:
# TODO: Create a small custom docker image with all the dependencies we need
# preinstalled to reduce installation time.
docker:
- image: circleci/buildpack-deps:bionic
- image: fbopensource/zstd-circleci-primary:0.0.1
steps:
- checkout
- *install-dependencies
- run:
name: Test
command: |
Expand All @@ -41,10 +22,9 @@ jobs:
# the second half of the jobs are in this test
short-tests-1:
docker:
- image: circleci/buildpack-deps:bionic
- image: fbopensource/zstd-circleci-primary:0.0.1
steps:
- checkout
- *install-dependencies
- run:
name: Test
command: |
Expand All @@ -61,12 +41,11 @@ jobs:
# tagged release.
publish-github-release:
docker:
- image: circleci/buildpack-deps:bionic
- image: fbopensource/zstd-circleci-primary:0.0.1
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
steps:
- checkout
- *install-dependencies
- run:
name: Publish
command: |
Expand All @@ -86,12 +65,11 @@ jobs:
# This step should only be run in a cron job
regression-test:
docker:
- image: circleci/buildpack-deps:bionic
- image: fbopensource/zstd-circleci-primary:0.0.1
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
steps:
- checkout
- *install-dependencies
# Restore the cached resources.
- restore_cache:
# We try our best to bust the cache when the data changes by hashing
Expand Down
9 changes: 9 additions & 0 deletions .circleci/images/primary/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM circleci/buildpack-deps:bionic

RUN sudo dpkg --add-architecture i386
RUN sudo apt-get -y -qq update
RUN sudo apt-get -y install \
gcc-multilib-powerpc-linux-gnu gcc-arm-linux-gnueabi \
libc6-dev-armel-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
libc6-dev-ppc64-powerpc-cross zstd gzip coreutils \
libcurl4-openssl-dev
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
*.dylib

# Executables
zstd
/zstd
zstdmt
*.exe
*.out
*.app

# Test artefacts
tmp*
dictionary*
dictionary.
NUL

# Build artefacts
Expand All @@ -41,3 +41,4 @@ _zstdbench/
.DS_Store
googletest/
*.d
*.vscode
42 changes: 29 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ matrix:
- make clean
- make travis-install # just ensures `make install` works

- name: c99 compatibility
if: branch = master
script:
- make c99build
- make -C tests test-zstd

- name: PPC64
if: branch = master
script:
Expand Down Expand Up @@ -184,20 +190,30 @@ matrix:
compiler: clang
install:
- sudo apt-get install -qq liblz4-dev valgrind tree
- travis_retry curl -o ~/ninja.zip -L 'https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip'
&& unzip ~/ninja.zip -d ~/.local/bin
- travis_retry curl -o ~/get-pip.py -L 'https://bootstrap.pypa.io/get-pip.py'
&& python3 ~/get-pip.py --user
&& pip3 install --user meson
script:
- meson --buildtype=debug
-Db_lundef=false
-Dauto_features=enabled
-Dbuild_{programs,tests,contrib}=true
-Ddefault_library=both
build/meson builddir
- cd builddir
- |
travis_retry curl -o ~/ninja.zip -L 'https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip' &&
unzip ~/ninja.zip -d ~/.local/bin
- |
travis_retry curl -o ~/get-pip.py -L 'https://bootstrap.pypa.io/get-pip.py' &&
python3 ~/get-pip.py --user &&
pip3 install --user meson
script:
- |
meson setup \
--buildtype=debugoptimized \
-Db_lundef=false \
-Dauto_features=enabled \
-Dbin_programs=true \
-Dbin_tests=true \
-Dbin_contrib=true \
-Ddefault_library=both \
build/meson builddir
- pushd builddir
- ninja
- meson test --verbose --no-rebuild
- DESTDIR=./staging ninja install
- tree ./staging
after_failure:
- cat "$TRAVIS_BUILD_DIR"/builddir/meson-logs/testlog.txt
allow_failures:
- env: ALLOW_FAILURES=true
30 changes: 30 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
v1.4.1
bug: Fix data corruption in niche use cases by @terrelln (#1659)
bug: Fuzz legacy modes, fix uncovered bugs by @terrelln (#1593, #1594, #1595)
bug: Fix out of bounds read by @terrelln (#1590)
perf: Improve decode speed by ~7% @mgrice (#1668)
perf: Slightly improved compression ratio of level 3 and 4 (ZSTD_dfast) by @cyan4973 (#1681)
perf: Slightly faster compression speed when re-using a context by @cyan4973 (#1658)
perf: Improve compression ratio for small windowLog by @cyan4973 (#1624)
perf: Faster compression speed in high compression mode for repetitive data by @terrelln (#1635)
api: Add parameter to generate smaller dictionaries by @tyler-tran (#1656)
cli: Recognize symlinks when built in C99 mode by @felixhandte (#1640)
cli: Expose cpu load indicator for each file on -vv mode by @ephiepark (#1631)
cli: Restrict read permissions on destination files by @chungy (#1644)
cli: zstdgrep: handle -f flag by @felixhandte (#1618)
cli: zstdcat: follow symlinks by @vejnar (#1604)
doc: Remove extra size limit on compressed blocks by @felixhandte (#1689)
doc: Fix typo by @yk-tanigawa (#1633)
doc: Improve documentation on streaming buffer sizes by @cyan4973 (#1629)
build: CMake: support building with LZ4 @leeyoung624 (#1626)
build: CMake: install zstdless and zstdgrep by @leeyoung624 (#1647)
build: CMake: respect existing uninstall target by @j301scott (#1619)
build: Make: skip multithread tests when built without support by @michaelforney (#1620)
build: Make: Fix examples/ test target by @sjnam (#1603)
build: Meson: rename options out of deprecated namespace by @lzutao (#1665)
build: Meson: fix build by @lzutao (#1602)
build: Visual Studio: don't export symbols in static lib by @scharan (#1650)
build: Visual Studio: fix linking by @absotively (#1639)
build: Fix MinGW-W64 build by @myzhang1029 (#1600)
misc: Expand decodecorpus coverage by @ephiepark (#1664)

v1.4.0
perf: Improve level 1 compression speed in most scenarios by 6% by @gbtucker and @terrelln
api: Move the advanced API, including all functions in the staging section, to the stable section
Expand Down
2 changes: 2 additions & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ compile_commands.json
CTestTestfile.cmake
build
lib
!cmake/lib
!meson/lib
2 changes: 0 additions & 2 deletions build/VS2010/libzstd-dll/libzstd-dll.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AssemblerOutput>All</AssemblerOutput>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -234,7 +233,6 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<WholeProgramOptimization>true</WholeProgramOptimization>
<OmitFramePointers>true</OmitFramePointers>
<AssemblerOutput>All</AssemblerOutput>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down
30 changes: 12 additions & 18 deletions build/VS2010/libzstd/libzstd.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,31 +90,26 @@
<ProjectGuid>{8BFD8150-94D5-4BF9-8A50-7BD9929A0850}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>libzstd</RootNamespace>
<TargetName>libzstd_static</TargetName>
<CharacterSet>MultiByte</CharacterSet>
<ConfigurationType>StaticLibrary</ConfigurationType>
<OutDir>$(SolutionDir)bin\$(Platform)_$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\</IntDir>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand All @@ -134,35 +129,36 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetName>libzstd_static</TargetName>
<IncludePath>$(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath);</IncludePath>
<RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetName>libzstd_static</TargetName>
<IncludePath>$(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath);</IncludePath>
<RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>libzstd_static</TargetName>
<IncludePath>$(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath);</IncludePath>
<RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>libzstd_static</TargetName>
<IncludePath>$(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath);</IncludePath>
<RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
Expand All @@ -182,7 +178,7 @@
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
Expand All @@ -202,11 +198,10 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AssemblerOutput>All</AssemblerOutput>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -224,14 +219,13 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<WholeProgramOptimization>true</WholeProgramOptimization>
<OmitFramePointers>true</OmitFramePointers>
<AssemblerOutput>All</AssemblerOutput>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down
49 changes: 49 additions & 0 deletions build/cmake/CMakeModules/FindLibLZ4.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Find LibLZ4
#
# Find LibLZ4 headers and library
#
# Result Variables
#
# LIBLZ4_FOUND - True if lz4 is found
# LIBLZ4_INCLUDE_DIRS - lz4 headers directories
# LIBLZ4_LIBRARIES - lz4 libraries
# LIBLZ4_VERSION_MAJOR - The major version of lz4
# LIBLZ4_VERSION_MINOR - The minor version of lz4
# LIBLZ4_VERSION_RELEASE - The release version of lz4
# LIBLZ4_VERSION_STRING - version number string (e.g. 1.8.3)
#
# Hints
#
# Set ``LZ4_ROOT_DIR`` to the directory of lz4.h and lz4 library

set(_LIBLZ4_ROOT_HINTS
ENV LZ4_ROOT_DIR)

find_path( LIBLZ4_INCLUDE_DIR lz4.h
HINTS ${_LIBLZ4_ROOT_HINTS})
find_library( LIBLZ4_LIBRARY NAMES lz4 liblz4 liblz4_static
HINTS ${_LIBLZ4_ROOT_HINTS})

if(LIBLZ4_INCLUDE_DIR)
file(STRINGS "${LIBLZ4_INCLUDE_DIR}/lz4.h" LIBLZ4_HEADER_CONTENT REGEX "#define LZ4_VERSION_[A-Z]+ +[0-9]+")

string(REGEX REPLACE ".*#define LZ4_VERSION_MAJOR +([0-9]+).*" "\\1" LIBLZ4_VERSION_MAJOR "${LIBLZ4_HEADER_CONTENT}")
string(REGEX REPLACE ".*#define LZ4_VERSION_MINOR +([0-9]+).*" "\\1" LIBLZ4_VERSION_MINOR "${LIBLZ4_HEADER_CONTENT}")
string(REGEX REPLACE ".*#define LZ4_VERSION_RELEASE +([0-9]+).*" "\\1" LIBLZ4_VERSION_RELEASE "${LIBLZ4_HEADER_CONTENT}")

set(LIBLZ4_VERSION_STRING "${LIBLZ4_VERSION_MAJOR}.${LIBLZ4_VERSION_MINOR}.${LIBLZ4_VERSION_RELEASE}")
unset(LIBLZ4_HEADER_CONTENT)
endif()

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibLZ4 REQUIRED_VARS LIBLZ4_INCLUDE_DIR
LIBLZ4_LIBRARY
VERSION_VAR LIBLZ4_VERSION_STRING
FAIL_MESSAGE "Could NOT find LZ4, try to set the paths to lz4.h and lz4 library in environment variable LZ4_ROOT_DIR")

if (LIBLZ4_FOUND)
set(LIBLZ4_LIBRARIES ${LIBLZ4_LIBRARY})
set(LIBLZ4_INCLUDE_DIRS ${LIBLZ4_INCLUDE_DIR})
endif ()

mark_as_advanced( LIBLZ4_INCLUDE_DIR LIBLZ4_LIBRARY )
Loading