Compare commits

...
792 Commits
Author SHA1 Message Date
Yann Collet 0774d05537 Merge pull request #1753 from lz4/fix_read_oob
Fix read oob
2026-06-01 15:21:37 -07:00
Yann Collet 587ed95577 add comments explaining read_variable_length() ilimit bounds, fix match length limit
The ilimit arguments to read_variable_length() were not obviously correct;
add one-line comments at each call site explaining the invariant.

Also tighten the match length limit from iend-LASTLITERALS to
iend-(1+LASTLITERALS): after match length extension bytes, the remaining
input must contain at least one token byte plus LASTLITERALS literal bytes.
2026-06-01 14:34:25 -07:00
Yann Collet 7332f25843 simplify read_variable_length() by removing initial_check parameter 2026-06-01 14:34:25 -07:00
Yann ColletandClaude Sonnet 4.6 fe1d3925da fix ip reaching iend in safe decode loop shortcut path
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 14:34:25 -07:00
Yann Collet a1eaa9342a fix ip reaching iend in fast decode loop 2026-06-01 14:34:25 -07:00
Yann Collet d22ca27e8d add ossfuzz fuzzer binaries to .gitignore 2026-06-01 14:34:25 -07:00
Yann Collet 0568154788 add unit test for all-0xFF input to LZ4_decompress_safe() 2026-06-01 14:34:25 -07:00
Yann Collet e64d5c5491 update read_variable_length() comment on initial_check 2026-06-01 14:34:25 -07:00
Yann Collet 65df5960f8 rename ip to ipPtr in read_variable_length() 2026-06-01 14:34:25 -07:00
Yann Collet 279bb25a67 fix read_variable_length() call sites limits 2026-06-01 14:34:25 -07:00
Yann Collet 167c38c99a remove unreachable overflow check in read_variable_length() 2026-06-01 14:34:25 -07:00
Yann Collet d5e67621de fix off-by-one OOB read in read_variable_length()
though to be fair, this function was never meant to receive a buffer limit as `ilimit`.
2026-06-01 14:34:25 -07:00
Yann Collet a79e8435d1 Merge pull request #1755 from lz4/bye_cirrus
Remove Cirrus CI configuration
2026-06-01 14:33:57 -07:00
Yann Collet 9a64b896fe Remove Cirrus CI configuration 2026-06-01 14:15:05 -07:00
Yann Collet 64e81c59de Merge pull request #1754 from lz4/make_auto_mt_build
Avoid resetting make jobserver in submakes
2026-05-28 21:10:36 -07:00
Yann Collet 518f56a4bd Avoid resetting make jobserver in submakes 2026-05-28 20:48:18 -07:00
Yann Collet 56d0d4e47a Merge pull request #1725 from Nicoshev/c3
Use 2-byte loads on LZ4_memcpy_using_offset_base
2026-05-27 09:13:24 -07:00
Yann Collet 21c21c9395 Merge pull request #1724 from Nicoshev/d1
Quickly branch on stream's end
2026-05-27 07:50:11 -07:00
Nicolas De Carli 0ecd4ac02f Merge branch 'dev' into d1 2026-05-27 09:54:51 -04:00
Nicolas De Carli 7771c606b1 Update assert message for clarity in lz4.c 2026-05-27 09:47:01 -04:00
Nicolas De Carli b0296ad1bc Address offset==0
Address testing case where offset==0
2026-05-27 09:43:33 -04:00
Nicolas De Carli 519a482e24 Relax assert
Relax assert to (offset >= 2)
2026-05-27 09:33:36 -04:00
Yann Collet e0ed584814 Merge pull request #1723 from Nicoshev/c1
Introduce LZ4_wildCopy64 for aarch64
2026-05-27 06:28:46 -07:00
Yann Collet 1b0fc69294 Merge pull request #1743 from lz4/dependabot/github_actions/actions/upload-artifact-7.0.1
build(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1
2026-05-01 14:40:15 -07:00
dependabot[bot] d8de8ef382 build(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/bbbca2ddaa5d8feaa63e36b76fdaad77386f024f...043fb46d1a93c77aae656e7c1c64a875d1fc6a0a)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-01 07:32:27 +00:00
Yann Collet 9da37b2eeb Merge pull request #1730 from lz4/dependabot/github_actions/microsoft/setup-msbuild-3
build(deps): bump microsoft/setup-msbuild from 2 to 3
2026-04-01 15:56:39 -07:00
Yann Collet 19f38f4e76 Merge pull request #1731 from lz4/dependabot/github_actions/github/codeql-action-4.35.1
build(deps): bump github/codeql-action from 4.32.4 to 4.35.1
2026-04-01 07:48:20 -07:00
dependabot[bot] 4128b88130 build(deps): bump github/codeql-action from 4.32.4 to 4.35.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.4 to 4.35.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/89a39a4e59826350b863aa6b6252a07ad50cf83e...c10b8064de6f491fea524254123dbe5e09572f13)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 07:06:23 +00:00
dependabot[bot] 49e9cd5994 build(deps): bump microsoft/setup-msbuild from 2 to 3
Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 2 to 3.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Commits](https://github.com/microsoft/setup-msbuild/compare/v2...v3)

---
updated-dependencies:
- dependency-name: microsoft/setup-msbuild
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 07:06:13 +00:00
Nicolas De Carli 93e8b693f4 Quickly branch on stream's end
Idea is to hoist stream's end branching logic:

if (ip > iend-(16 + 1/*max lit + offset + nextToken*/)) { cpy = op+length; goto safe_literal_copy; }

The if clause can be determined before reading the input stream, thus the CPU should be able to decide on branching before loading the next token.

Benchmarking on Silesia using Neoverse-V2 shows noticeable decompressing speed improvements:

Before:

  #dickens           :  3612.0 MB/s
  #mozilla           :  4429.2 MB/s
  #mr                :  4651.1 MB/s
  #nci               :  6352.6 MB/s
  #osdb              :  4379.9 MB/s
  #reymont           :  3148.0 MB/s
  #samba             :  4856.7 MB/s
  #sao               :  7059.6 MB/s
  #webster           :  3913.7 MB/s
  #xml               :  5082.2 MB/s
  #x-ray             :  16059.6 MB/s

After:

  #dickens           :  3842.3 MB/s ----> +6%
  #mozilla           :  4580.8 MB/s ----> +3%
  #mr                :  4930.7 MB/s ----> +6%
  #nci               :  6516.1 MB/s ----> +3%
  #osdb              :  4522.2 MB/s ----> +3%
  #reymont           :  3344.3 MB/s ----> +6%
  #samba             :  5066.3 MB/s ----> +4%
  #sao               :  7175.5 MB/s ----> +2%
  #webster           :  4134.1 MB/s ----> +6%
  #xml               :  5326.1 MB/s ----> +5%
  #x-ray             :  16424.5 MB/s ---> +2%
2026-03-20 12:24:31 -04:00
Nicolas De Carli 20e0be96d3 Use 2-byte loads on LZ4_memcpy_using_offset_base
Change first bytes copy of LZ4_memcpy_using_offset_base to 2-byte memcpys. Idea is to use two 2-byte memory load/stores instruction pairs instead of four 1-byte loads/stores. It is safe because the function gets called only when offset is at least 3
2026-03-19 18:14:55 -04:00
Nicolas De Carli 651a70a381 Introduce LZ4_wildCopy64 for aarch64
Leveraging that FASTLOOP_SAFE_DISTANCE is 64, we are introducing LZ4_wildCopy64, which copies 64 bytes at a time. This is specially fast on aarch64 due to compiling using the ldp instruction.

We see noticeable performance improvements on decompression speed when tested using Neoverse-V2.
Below measurements are the median of 3 runs.

Before:

  #dickens           :  3589.4 MB/s
  #mozilla           :  4313.6 MB/s
  #mr                :  4443.0 MB/s
  #nci               :  6199.0 MB/s
  #osdb              :  4345.9 MB/s
  #reymont           :  3160.8 MB/s
  #samba             :  4726.0 MB/s
  #sao               :  5939.5 MB/s
  #webster           :  3872.3 MB/s
  #xml               :  4818.1 MB/s
  #x-ray             :  14264.5 MB/s

After:

  #dickens           :  3612.0 MB/s ----> +1%
  #mozilla           :  4429.2 MB/s ----> +3%
  #mr                :  4651.1 MB/s ----> +5%
  #nci               :  6352.6 MB/s ----> +2%
  #osdb              :  4379.9 MB/s ----> +1%
  #reymont           :  3148.0 MB/s ----> -1%
  #samba             :  4856.7 MB/s ----> +3%
  #sao               :  7059.6 MB/s ----> +19%
  #webster           :  3913.7 MB/s ----> +1%
  #xml               :  5082.2 MB/s ----> +5%
  #x-ray             :  16059.6 MB/s ----> +13%
2026-03-19 18:06:55 -04:00
Yann Collet 5c4c1fb235 Merge pull request #1714 from jlee303/compress_bound_one
Fix compress bound off by one
2026-03-02 20:44:50 -08:00
Yann Collet b853ce3c3a Merge pull request #1716 from lz4/missing_prototypes
Added -Wmissing-prototypes to the list of warning flags
2026-03-02 20:35:21 -08:00
Yann Collet 5ef1f16929 fix -Wmissing-prototypes warnings 2026-03-02 19:33:16 -08:00
Yann Collet 98ea0980be Added -Wmissing-prototypes to the list of warning flags
note: this will break CI, until the code get fixed
2026-03-02 19:27:35 -08:00
Yann Collet bd3351792f Merge pull request #1718 from lz4/dependabot/github_actions/github/codeql-action-4.32.4
build(deps): bump github/codeql-action from 4.31.2 to 4.32.4
2026-03-01 08:09:22 -08:00
Yann Collet 9ff0e7179f Merge pull request #1719 from lz4/dependabot/github_actions/actions/upload-artifact-7.0.0
build(deps): bump actions/upload-artifact from 6.0.0 to 7.0.0
2026-03-01 00:40:10 -08:00
dependabot[bot] 4113c6768e build(deps): bump actions/upload-artifact from 6.0.0 to 7.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/b7c566a772e6b6bfb58ed0dc250532a479d7789f...bbbca2ddaa5d8feaa63e36b76fdaad77386f024f)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-01 06:42:26 +00:00
dependabot[bot] 7ff996b3ae build(deps): bump github/codeql-action from 4.31.2 to 4.32.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.2 to 4.32.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/0499de31b99561a6d14a36a5f662c2a54f91beee...89a39a4e59826350b863aa6b6252a07ad50cf83e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.32.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-01 06:42:20 +00:00
Jennifer Lee b27666804a Add missing include 2026-02-24 00:54:48 -08:00
Jennifer 0f1a9666bb revert formatting changes + address comments 2026-02-24 00:45:22 -08:00
Yann Collet 130f457aea Merge pull request #1715 from jlee303/package_dll
Update appveyor with .dll files
2026-02-24 00:31:03 -08:00
jlee303 3e231ebc2c Merge branch 'lz4:dev' into compress_bound_one 2026-02-23 22:30:41 -08:00
Yann Collet 1519f46a3a Merge pull request #1713 from arpadpanyik-arm/fastdec_android
AArch64: Enable LZ4_FAST_DEC_LOOP for Android
2026-02-17 14:53:43 -08:00
Yann Collet 86b10567e0 Merge pull request #1717 from lz4/redef_typedef
fix typedef redefinition warning in strict C90 mode
2026-02-17 12:51:21 -08:00
Jennifer Lee 271ae4c7f2 fix sanitizer error 2026-02-13 18:18:23 -08:00
Jennifer Lee 3afa73236c fix test errors 2026-02-13 18:04:27 -08:00
Jennifer Lee 1a53cf036b fix missing include 2026-02-13 17:52:40 -08:00
Jennifer Lee da999f7990 fix test error 2026-02-13 17:48:48 -08:00
Jennifer Lee 713f159fa7 add testcase 2026-02-13 17:38:30 -08:00
Jennifer Lee 7a3258aacd revert prev test case 2026-02-13 17:02:01 -08:00
Jennifer Lee c474ef8be9 Revert prev changes and fix bug 2026-02-13 16:54:46 -08:00
Jennifer Lee d93de1a0b7 fix typo 2026-02-13 15:32:22 -08:00
Jennifer Lee 4629929234 Update appveyor 2026-02-13 14:37:28 -08:00
Yann Collet 01d0a210af fix typedef redefinition warning in strict C90 mode
when using amalgamated source code,
and make the test reactive to warnings (`-Werror`)
2026-02-12 14:51:54 -08:00
Jennifer Lee 2ec033d96c Fix .dll error 2026-02-08 17:19:15 -08:00
Jennifer Lee dea64e707a Rename .dll file to match makefile name 2026-02-08 17:10:38 -08:00
Jennifer Lee 316cbe9903 add platform/utils 2026-02-08 16:49:23 -08:00
Jennifer Lee 3b8e20bb1e Update appveyor with .dll files 2026-02-08 16:07:40 -08:00
Jennifer Lee c4ecc4213f fix style for test errors 2026-02-08 15:29:44 -08:00
Jennifer Lee 5aa4ecb42d fix compress bound off by one 2026-02-08 15:10:53 -08:00
Arpad Panyik ed86bc1ed8 AArch64: Enable LZ4_FAST_DEC_LOOP for Android
Drop Android/Clang AArch64 fast decode loop disablement.
Uplifts on some Cortex CPUs:

  Cortex-A55    Clang-18  Clang-19  Clang-20  Clang-21
-1#silesia.tar:    1.65%     1.90%     1.50%     1.79%
-2#silesia.tar:    1.80%     1.39%     0.98%     1.68%
-3#silesia.tar:    1.90%     1.88%     1.20%     1.96%

  Cortex-A510   Clang-18  Clang-19  Clang-20  Clang-21
-1#silesia.tar:    9.35%     7.47%     7.69%     8.79%
-2#silesia.tar:    4.09%     5.59%     4.31%     3.81%
-3#silesia.tar:    5.63%     3.81%     3.46%     4.07%

  Cortex-A520   Clang-18  Clang-19  Clang-20  Clang-21
-1#silesia.tar:    9.20%     8.64%     9.02%     6.94%
-2#silesia.tar:    6.90%     6.21%     6.55%     6.96%
-3#silesia.tar:    7.47%     7.91%     6.71%     4.31%

  Cortex-A76    Clang-18  Clang-19  Clang-20  Clang-21
-1#silesia.tar:   13.66%    12.16%    12.40%    12.52%
-2#silesia.tar:    9.40%     9.21%     9.71%     9.49%
-3#silesia.tar:   11.01%    11.01%    11.30%    11.02%

  Cortex-A78    Clang-18  Clang-19  Clang-20  Clang-21
-1#silesia.tar:   13.71%    13.82%    13.47%    13.27%
-2#silesia.tar:   10.34%    10.33%     9.95%     9.73%
-3#silesia.tar:   10.95%    11.13%    10.91%    10.93%

  Cortex-A710   Clang-18  Clang-19  Clang-20  Clang-21
-1#silesia.tar:   13.98%    13.95%    13.30%    13.60%
-2#silesia.tar:   10.24%    10.16%     9.52%    10.03%
-3#silesia.tar:   11.02%    10.79%    10.36%    10.83%

  Cortex-A715   Clang-18  Clang-19  Clang-20  Clang-21
-1#silesia.tar:   15.10%    15.33%    15.08%    13.61%
-2#silesia.tar:   10.93%    10.47%    12.06%    12.73%
-3#silesia.tar:   12.24%    11.23%    15.57%    13.20%

  Cortex-A720   Clang-18  Clang-19  Clang-20  Clang-21
-1#silesia.tar:   13.28%    13.48%    13.34%    14.56%
-2#silesia.tar:    7.95%     8.66%     9.23%    10.51%
-3#silesia.tar:   10.85%    11.21%    11.97%    13.26%

  Cortex-A725   Clang-18  Clang-19  Clang-20  Clang-21
-1#silesia.tar:   14.02%    13.73%    15.21%    15.56%
-2#silesia.tar:    9.22%     9.04%    10.25%    11.38%
-3#silesia.tar:   11.28%    11.51%    12.66%    13.65%

  Cortex-X1     Clang-18  Clang-19  Clang-20  Clang-21
-1#silesia.tar:   14.80%    15.14%    14.73%    14.38%
-2#silesia.tar:   11.12%    11.16%    11.06%    10.61%
-3#silesia.tar:   12.26%    12.37%    12.06%    11.85%

  Cortex-X2     Clang-18  Clang-19  Clang-20  Clang-21
-1#silesia.tar:   13.58%    13.63%    13.70%    13.12%
-2#silesia.tar:   10.07%    10.31%     9.68%     8.68%
-3#silesia.tar:   11.25%    12.08%    11.33%    10.30%

  Cortex-X3     Clang-18  Clang-19  Clang-20  Clang-21
-1#silesia.tar:   11.46%    11.72%    11.22%    10.83%
-2#silesia.tar:    7.87%     7.88%     7.78%     7.39%
-3#silesia.tar:   10.72%    10.28%    10.14%     9.09%

 Cortex-X4      Clang-18  Clang-19  Clang-20  Clang-21
-1#silesia.tar:   10.40%     9.97%    10.38%    11.29%
-2#silesia.tar:    6.02%     6.22%     5.75%     6.47%
-3#silesia.tar:    8.20%     8.06%     7.94%     8.61%
2026-02-02 19:51:03 +01:00
Yann Collet 446a35fb65 Merge pull request #1697 from jlee303/add_content_sz_warning
Add warning message when content size flag is used with stdin
2026-01-26 09:06:39 -08:00
Yann Collet b40122c688 Merge pull request #1710 from lz4/dependabot/github_actions/actions/checkout-6.0.2
build(deps): bump actions/checkout from 6.0.1 to 6.0.2
2026-01-26 09:05:37 -08:00
Yann Collet 52b91b37a9 Merge pull request #1709 from lz4/dependabot/github_actions/actions/setup-python-6.2.0
build(deps): bump actions/setup-python from 6.1.0 to 6.2.0
2026-01-26 09:04:28 -08:00
dependabot[bot] ce191b2dc1 build(deps): bump actions/checkout from 6.0.1 to 6.0.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v6.0.1...v6.0.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-26 04:41:41 +00:00
dependabot[bot] 6b538f9889 build(deps): bump actions/setup-python from 6.1.0 to 6.2.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/83679a892e2d95755f2dac6acb0bfd1e9ac5d548...a309ff8b426b58ec0e2a45f0f869d46889d02405)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-26 04:41:27 +00:00
Yann Collet 7f9f99f16b Merge pull request #1707 from lz4/ga_concurrency
narrower concurrency groups
2026-01-25 20:36:37 -08:00
Yann Collet 726e927dc4 narrow concurrency groups
so that 2 PRs do not just cancel each other
2026-01-25 20:04:38 -08:00
Yann Collet 86d341d88c Merge pull request #1706 from lz4/make_windows
make improvements
2026-01-25 14:38:27 -08:00
Yann Collet b7e360402e fix race condition when building liblz4.a 2026-01-25 12:47:12 -08:00
Yann Collet a5e8688350 Merge pull request #1699 from lz4/invalid_null_non0
Updated lz4hc documentation: LZ4_saveDictHC() expects valid arguments
2026-01-25 12:45:22 -08:00
Yann Collet a606dd0a0a fix wrong test
relying on linear single thread build
2026-01-25 12:07:16 -08:00
Yann Collet 6f8f65d2c4 fix minor yet complex issue involving thread pool
in the context of multiple Makefile invoking each other.
2026-01-25 12:02:46 -08:00
Yann Collet aa8694a11e make compilation uses multithreading by default 2026-01-25 10:59:16 -08:00
Yann Collet 7395b3e342 fix make warnings when compiling on Windows 2026-01-25 08:20:21 -08:00
Yann Collet 656f44bf1a Merge pull request #1701 from jlee303/datagen
Update datagen to return error if usage is not expected
2026-01-25 08:09:33 -08:00
Yann Collet 1099b137c7 Merge pull request #1705 from lz4/bench_dec_10000_more
bench: align display when speed > 10000 MB/s
2026-01-25 07:50:28 -08:00
Yann Collet c57dfafe27 bench: align display when speed > 10000 MB/s
as cpus get faster, it's now possible for some of them to reach speeds > 10000 MB/s on single core.
Ensure that the display remains properly aligned in this case.
2026-01-24 22:40:20 -08:00
Yann Collet 19dee604bb Merge pull request #1702 from lz4/appv_badge_less
removed broken appveyor badge
2026-01-24 21:58:32 -08:00
Yann Collet 3ba476852e Merge pull request #1703 from lz4/circle_less
reduced tests on circle ci
2026-01-24 14:45:15 -08:00
Jenn e0c0b9f10f Add datagen test casE 2026-01-22 15:44:18 -08:00
Yann Collet 6ca266a96f reduced tests on circle ci
this is now the slowest single test in the suite,
removed some duplicated parts,
such as static analyzer, and qemu tests.
2026-01-22 15:27:42 -08:00
Jenn a73a03dbb8 Return error if usage is not expected 2026-01-22 15:22:09 -08:00
Yann Collet 72666bffc8 removed broken appveyor badge
no reason to track this signal specifically: it's just part of CI
2026-01-22 15:20:30 -08:00
Yann Collet 34b5f091c9 Merge pull request #1698 from jlee303/lz4_dict
Remove extra $ causing bug #1672
2026-01-22 15:03:51 -08:00
Yann Collet de06fcf574 Updated lz4hc documentation: LZ4_saveDictHC() expects valid arguments
and a `(NULL, !0)` is **not** valid.
2026-01-22 14:11:00 -08:00
Yann Collet 1e123b0fc2 Merge pull request #1700 from lz4/cirrus_bsd16
[ci] update FreeBSD image to 15
2026-01-22 13:53:49 -08:00
Yann Collet 3b518b2b02 [ci] update FreeBSD image to 15
since 14.2 is no longer supported by CirrusCI
2026-01-22 13:30:50 -08:00
Jenn bd4e61b7f0 Add fix to bug 2026-01-21 13:25:53 -08:00
jlee303 f3aedd1344 add warning message when content size flag is used with stdin 2026-01-21 11:39:34 -08:00
Yann Collet a018abc07a Merge pull request #1665 from cclauss/dev
CircleCI: Test using Python 3.14 instead of 3.4
2026-01-01 22:48:39 -08:00
Yann Collet d8faa81bbc Merge pull request #1643 from Benjamin-Philip/bp/docs-touch-up-double-buffer-example
Touch up double buffer example
2026-01-01 22:48:27 -08:00
Yann Collet c609c16aed Merge pull request #1689 from lz4/dependabot/github_actions/actions/upload-artifact-6.0.0
build(deps): bump actions/upload-artifact from 4.6.2 to 6.0.0
2025-12-15 01:15:01 -08:00
dependabot[bot] 23d32f0b1b build(deps): bump actions/upload-artifact from 4.6.2 to 6.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.2 to 6.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/ea165f8d65b6e75b540449e92b4886f43607fa02...b7c566a772e6b6bfb58ed0dc250532a479d7789f)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 06:02:34 +00:00
Yann Collet 110097559f Merge pull request #1683 from lz4/dependabot/github_actions/actions/checkout-6.0.1
build(deps): bump actions/checkout from 6.0.0 to 6.0.1
2025-12-12 07:06:59 +09:00
dependabot[bot] 147270761c build(deps): bump actions/checkout from 6.0.0 to 6.0.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v6...v6.0.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 06:03:03 +00:00
Yann Collet 92c3963f11 Merge pull request #1679 from lz4/dependabot/github_actions/actions/setup-python-6.1.0
build(deps): bump actions/setup-python from 6.0.0 to 6.1.0
2025-12-01 10:13:50 -08:00
dependabot[bot] 46af48bb7c build(deps): bump actions/setup-python from 6.0.0 to 6.1.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/e797f83bcb11b83ae66e0230d6156d7c80228e7c...83679a892e2d95755f2dac6acb0bfd1e9ac5d548)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 06:25:18 +00:00
Yann Collet 3c08d0d8cb Merge pull request #1675 from lz4/dependabot/github_actions/actions/checkout-6.0.0
build(deps): bump actions/checkout from 5.0.0 to 6.0.0
2025-11-24 10:27:58 -08:00
dependabot[bot] ea6dc9b608 build(deps): bump actions/checkout from 5.0.0 to 6.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 06:04:07 +00:00
Yann Collet 3773273593 Merge pull request #1670 from lz4/dependabot/github_actions/github/codeql-action-4.31.2
build(deps): bump github/codeql-action from 3.30.1 to 4.31.2
2025-11-03 19:41:06 +01:00
dependabot[bot] c5e9dc7e74 build(deps): bump github/codeql-action from 3.30.1 to 4.31.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.1 to 4.31.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/f1f6e5f6af878fb37288ce1c627459e94dbf7d01...0499de31b99561a6d14a36a5f662c2a54f91beee)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 06:03:44 +00:00
Christian Clauss 6ed67066e5 CircleCI: Test using Python 3.14 instead of 3.4
* https://devguide.python.org/versions
* https://www.python.org/downloads/release/python-3140/
2025-10-21 13:05:19 +02:00
Yann Collet f8e365036e Merge pull request #1654 from lz4/lz4f_decompress_doc
update LZ4F_decompress() code documentation
2025-09-16 08:20:34 -08:00
Yann Collet c99cfe4792 update LZ4F_decompress() code documentation
use doxygen format
2025-09-15 09:08:51 -07:00
Yann Collet ec86e3da5d Merge pull request #1634 from Artoria2e5/patch-1
lz4_Frame_format.md: document kernel legacy last block
2025-09-11 14:52:31 -07:00
Yann Collet 7d33531b52 Merge pull request #1648 from Polaris-911/dev
Configure LZ4_FORCE_MEMORY_ACCESS=2 for RISC-V with Zicclsm extension
2025-09-11 14:51:59 -07:00
Yann Collet 8e51a91d32 Merge pull request #1651 from lz4/dependabot/github_actions/github/codeql-action-3.30.1
build(deps): bump github/codeql-action from 3.29.1 to 3.30.1
2025-09-08 12:18:47 -07:00
Yann Collet 39250499c1 Merge pull request #1650 from lz4/dependabot/github_actions/actions/setup-python-6.0.0
build(deps): bump actions/setup-python from 5.6.0 to 6.0.0
2025-09-08 09:40:16 -07:00
dependabot[bot] 9ae57d6e0a build(deps): bump github/codeql-action from 3.29.1 to 3.30.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.1 to 3.30.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/39edc492dbe16b1465b0cafca41432d857bdb31a...f1f6e5f6af878fb37288ce1c627459e94dbf7d01)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 06:03:14 +00:00
dependabot[bot] 5b53668d45 build(deps): bump actions/setup-python from 5.6.0 to 6.0.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.6.0 to 6.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/a26af69be951a213d495a4c3e4e4022e16d87065...e797f83bcb11b83ae66e0230d6156d7c80228e7c)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 06:03:08 +00:00
Yann Collet 735042fcea Merge pull request #1649 from a-detiste/dev
remove outdated debian/ files that uses EOL CDBS
2025-09-05 15:33:53 -07:00
Alexandre Detiste 9218b701ee remove outdated debian/ files that uses EOL CDBS 2025-08-31 12:51:30 +02:00
Huang Shangcheng 6aabc3f823 Configure LZ4_FORCE_MEMORY_ACCESS=2 for RISC-V with Zicclsm extension 2025-08-27 15:20:08 +08:00
Yann Collet bf71be6a86 Merge pull request #1645 from lz4/dependabot/github_actions/actions/checkout-5
build(deps): bump actions/checkout from 4 to 5
2025-08-23 19:23:58 -07:00
dependabot[bot] f46b9690aa build(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-18 09:41:38 +00:00
Benjamin Philip e86c1217b6 Expand "What's the point of this example?" 2025-08-16 19:59:30 +05:30
Benjamin Philip 64ddd69095 Format 2025-08-16 19:49:06 +05:30
Benjamin Philip bf41eb8700 Fix grammar 2025-08-16 19:42:12 +05:30
Benjamin Philip 3ecbee3dc9 Split ASCII illustrations 2025-08-16 19:05:36 +05:30
Mingye Wang ef02dc63ef lz4_Frame_format.md: document kernel legacy last block
Since https://github.com/torvalds/linux/commit/2c484419efc09e7234c667aa72698cb79ba8d8ed, the Linux Kernel is able to discern the end of a legacy LZ4 frame by the presence of four 0 bytes, parsed as a B.CSize of 0 in the decoder. This is originally intended to make it mix well with grub initrd concatenation behavior (which uses a clause in the initramfs format about allowing arbitrary zero paddings), but I think it is a pretty good idea for any application limited to the legacy format in general.
2025-07-21 12:15:48 +08:00
Yann Collet cacca37747 Merge pull request #1629 from lz4/dependabot/github_actions/github/codeql-action-3.29.1
build(deps): bump github/codeql-action from 3.28.5 to 3.29.1
2025-06-30 08:36:39 -07:00
dependabot[bot] 7335859602 build(deps): bump github/codeql-action from 3.28.5 to 3.29.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.5 to 3.29.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4...39edc492dbe16b1465b0cafca41432d857bdb31a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-30 07:51:37 +00:00
Yann Collet 2bc386d57c Merge pull request #1595 from felixhandte/ctx-size-funcs
Add Functions that Report LZ4F Contexts' Memory Footprints
2025-06-02 16:35:00 -07:00
W. Felix Handte 063d1a978a Add Test Validating Allocated Size Matches Reported Size
Adds additional record-keeping to track the live allocation size of a context
using a custom memory allocator.

This could be extended to more scenarios (e.g., streaming) if desired.
2025-06-02 11:06:59 -04:00
W. Felix Handte 92a17e9e0d Add Functions that Return the Memory Footprint for LZ4F Contexts 2025-06-02 10:32:49 -04:00
Yann Collet 9d04141cfc Merge pull request #1581 from KSSAB/dev
Replaced uint8_t with unsigned char in BYTE typedef for post C99/C++
2025-06-01 13:32:01 -07:00
Yann Collet e0d8ff8cee Merge pull request #1593 from louislafosse/fix/null-params
fix(null) : improve error handlings when passing a null pointer to some functions from lz4frame
2025-06-01 13:28:30 -07:00
Louis Lafosse 324b81a5d1 Merge branch 'dev' into fix/null-params 2025-06-01 19:57:39 +02:00
Yann Collet 351fc6197d Merge pull request #1623 from TomasLeTrain/patch-1
Fixed small typo
2025-05-30 13:15:56 -07:00
Tomas Lopez 79a80135dd Fix typo 2025-05-30 14:28:32 -04:00
Louis Lafosse 15787d2640 Merge branch 'dev' into fix/null-params 2025-05-28 09:24:21 +02:00
louislafosse f64efec011 fix(null) : improve error handlings when passing a null pointer to some functions from lz4frame 2025-05-27 23:05:06 +02:00
Yann Collet db84c07b79 Merge pull request #1621 from lz4/ci_reorg
Github Actions script refactoring
2025-05-26 19:50:22 -07:00
Yann Collet 69505fc4e2 remove reference to x32 tests
this ABI is no longer supported by Github Actions
2025-05-27 02:17:34 +00:00
Yann Collet 64231b7b5f reorganize Github Actions CI script
improved modularity for better readability
2025-05-27 02:11:38 +00:00
Yann Collet 8ad17f092c Merge pull request #1620 from lz4/ci_refactor
Lz4 ci minor optimization
2025-05-26 19:01:46 -07:00
Yann Collet 1cc2834a59 ci: reduce OSS-Fuzz runtime from 300s to 100s per sanitizer
- Reduces total OSS-Fuzz CI time from 15 minutes to 5 minutes
- 100 seconds is sufficient to validate OSS-Fuzz integration scripts
- Saves ~10 minutes per CI run while maintaining functionality
2025-05-26 22:46:52 +00:00
Yann Collet 5d825d23e0 reduced compiler test matrix 2025-05-26 22:10:09 +00:00
Yann Collet 58d3acb530 remove redundant tests 2025-05-26 19:39:51 +00:00
Yann Collet 0190dcf4f9 Merge pull request #1619 from lz4/test-appveyor-refactor
refactor appveyor test
2025-05-26 00:30:27 -07:00
Yann Collet c42731ece6 Optimize AppVeyor CI: Remove Visual Studio builds (moved to GitHub Actions)
- Reduces AppVeyor build matrix from 6 to 3 jobs (50% reduction)
- Eliminates redundant Visual Studio testing (now handled by faster GitHub Actions)
- Focuses AppVeyor on unique MinGW testing (GCC + Clang on Windows)
- Reduces lines from 107 to 87 (19% shorter)
- Significantly reduces CI time by leveraging faster GitHub Actions for VS builds

AppVeyor now handles:
- MinGW GCC builds (mingw32, mingw64)
- MinGW Clang builds (mingw64)

GitHub Actions continues to handle:
- Visual Studio builds (Win32, x64)
- Extensive Linux compiler matrix
- Cross-platform compatibility testing
2025-05-26 05:29:25 +00:00
Yann Collet c2a47dacb9 Refactor appveyor.yml for better readability and maintainability
Key improvements:
- Reorganized build matrix for logical grouping (gcc, clang, visual)
- Used YAML multi-line syntax (>) for better readability of long commands
- Added clear section comments to separate install/build/test phases
- Simplified test logic by removing unnecessary 'unknown' compiler check
- Consolidated repetitive operations while keeping all logic visible
- Broke up long lines for better maintainability
- Preserved all original functionality and build targets
2025-05-26 01:53:26 +00:00
Yann Collet ab30556b67 Merge pull request #1618 from lz4/feature/cmake-readability-improvements
cmake readability improvements
2025-05-25 16:36:19 -07:00
Yann Collet 01d0e07607 Simplify CMake workflow by removing redundancies
- Consolidated 6 jobs into 3 jobs for better maintainability
- Removed duplicate CMake version testing, integration tests, and build configurations
- Maintained all essential test coverage while reducing CI runtime
- Simplified matrix configuration with explicit generator values for all entries
2025-05-25 23:03:14 +00:00
Yann Collet 21aeb60f6e transfer cmake CI tests into cmake-test.yml 2025-05-25 14:13:28 -07:00
Yann Collet 3ae1482cc6 fix integration tests 2025-05-25 15:41:31 +00:00
Yann Collet 51540061ea reduced cmake tests
reduced redundancy and complexity.
2025-05-25 15:06:36 +00:00
Yann Collet 280f21bbd3 fix cmake on Windows 2025-05-25 14:55:21 +00:00
Yann Collet 444fcfe868 fix directory name in cmake version test 2025-05-25 06:31:49 +00:00
Yann Collet f6f8860132 removed cmake 3.5.x tests
badly supported by Github Actions runner.
2025-05-25 06:29:18 +00:00
Yann Collet c45ffe5380 Check and fix "Verify installation structure" test 2025-05-25 05:24:05 +00:00
Yann Collet 31f3538b83 attempt to run cmake version tests on ubuntu 22.04
since ubuntu 20.04 is deprecated
2025-05-25 04:46:29 +00:00
Yann Collet 41b00256a0 cast printf("%p") to (void*) to avoid (overly) pedantic warnings 2025-05-25 04:39:37 +00:00
Yann Collet 7e0a8d1cbf Add comprehensive CMake build system testing workflow
- Validates CMake improvements across multiple platforms and versions
- Tests default build type configuration (Release as default)
- Tests configurable LZ4_DEBUG_LEVEL (0-8) with CMake GUI support
- Tests Debug builds default to LZ4_DEBUG_LEVEL=1, Release to 0
- Tests parallel build race condition fixes for symlink creation
- Tests installation and package config generation
- Tests external project integration via find_package()
- Ensures CMake version compatibility (3.5 to latest)
- Provides comprehensive regression testing for CMake changes

Triggers on pushes to 'dev', 'release', and any branch containing 'cmake'
2025-05-25 03:50:12 +00:00
Yann Collet 1079933be4 cmake: Add configurable LZ4_DEBUG_LEVEL (0-8) with CMake GUI support
- Replace fixed LZ4_DEBUG=1 for Debug builds with configurable levels
- Level 0: Disabled (default for Release builds)
- Level 1: Enable assert() statements (default for Debug builds)
- Levels 2-8: Enable debug traces with increasing verbosity
- Add CMake GUI dropdown with options 0-8 for easy configuration
- Maintain MSVC and GCC/Clang compiler compatibility
- Preserve CMake 3.5+ compatibility using add_definitions()
- Only apply macro when level > 0 to avoid unnecessary definitions
2025-05-25 03:18:01 +00:00
Yann Collet a60fb3b5e7 cmake: Enable LZ4_DEBUG=1 in Debug builds
- Add conditional compilation flag for Debug builds
- Set LZ4_DEBUG=1 to enable assert() statements when debugging
- Use compiler-specific syntax: /DLZ4_DEBUG=1 for MSVC, -DLZ4_DEBUG=1 for GCC/Clang
- Ensure CMake 3.5+ compatibility using add_definitions()
- Apply globally to all targets for consistent debug behavior
2025-05-25 02:01:19 +00:00
Yann Collet 55061612bd cmake: Fix symlink creation race condition in parallel builds
Add missing DEPENDS lz4cli to symlink creation targets to ensure
the lz4cli executable is built before attempting to create symlinks.
This resolves 'No such file or directory' errors when using --parallel
builds where symlink targets could run before the executable target
was completed.

Fixes parallel build compatibility for Unix symlink creation.
2025-05-24 22:02:54 +00:00
Yann Collet dc03bcc33b Add default build type configuration to CMakeLists.txt
- Set Release as default build type when none is specified
- Prevents undefined build behavior when running cmake without -DCMAKE_BUILD_TYPE
- Includes proper cache configuration with user-friendly description
- Provides dropdown options for cmake-gui users
2025-05-24 21:27:32 +00:00
Yann Collet 684ffb3f22 Update CMake version requirements to support broader compatibility
This commit:
- Maintains CMake compatibility with older systems by keeping the minimum version at 3.5
- Sets the maximum policy version to 4.0.2 to ensure consistent behavior with newer CMake versions
- Adds a comment explaining the version range specification purpose
- Ensures future-proofing as newer CMake versions will use the 4.0.2 policy set
2025-05-24 19:26:28 +00:00
Yann Collet b4c20713d4 Improve CMakeLists.txt readability with better structure
This commit improves the readability and maintainability of the CMake build system by:
1. Adding clear section headers with descriptive comments
2. Fixing indentation consistency throughout the file
3. Adding labels to endif() statements to match their corresponding if statements
4. Using visual separators (dashed lines) for better visual organization

These changes make the file easier to navigate without changing its functionality.
2025-05-24 19:12:48 +00:00
Yann Collet 0ea91654f2 Merge pull request #1617 from lz4:refactor_lz4file
Refactor lz4file
2025-05-24 11:36:56 -07:00
Yann Collet 2e576a4e18 x32 mode is deprecated. No need to use space on homepage. 2025-05-24 17:55:36 +00:00
Yann Collet 700ac95f23 minor refactor of LZ4F_write() in lz4file.c 2025-05-23 23:33:13 -07:00
Yann Collet f30a0a954a minor refactor of LZ4F_writeOpen() in lz4file.c 2025-05-23 23:08:35 -07:00
Yann Collet 672d141b99 minor refactor of LZ4F_read() in lz4file.c 2025-05-23 19:22:05 -07:00
Yann Collet 3afe5a5e6c minor: refactor of LZ4F_readOpen() in lz4file.c 2025-05-23 18:53:34 -07:00
Yann Collet 836decd8a8 Merge pull request #1614 from lz4/make3
Make build update
2025-05-05 22:03:25 -07:00
Yann Collet 56d804309c examples create their own version of liblz4.a
to avoid race conditions during parallel builds and tests
2025-05-05 20:05:45 -07:00
Yann Collet 6c6c95d764 fix ctocxxtest 2025-05-05 19:32:24 -07:00
Yann Collet 6a65138bd8 update "make lib" from tests/
to not override CFLAGS required adjustment (+fPIC)
2025-05-05 18:51:19 -07:00
Yann Collet 85d1c10ebe adjust cxxtest 2025-05-05 18:26:44 -07:00
Yann Collet 55341797c3 changed way to add -fPIC 2025-05-05 17:53:56 -07:00
Yann Collet 15e4851751 added traces for circleci 2025-05-05 17:39:12 -07:00
Yann Collet 191efabe60 dynamic library built with multiconf.make
on posix.

Windows build is more complex.
It's doubtful if it's worth forcing its integration within multiconf.make.
2025-05-05 17:33:38 -07:00
Yann Collet b1e83528d3 static library built with multiconf.make 2025-05-05 17:12:23 -07:00
Yann Collet fe679bf80d update multiconf.make 2025-05-05 16:36:27 -07:00
Yann Collet e0ce0c13bb Merge pull request #1612 from lz4/multiconf
Refactor make build
2025-05-04 13:10:48 -07:00
Yann Collet c9c9bf8c12 added multiconf doc 2025-05-01 16:53:52 -07:00
Yann Collet 5c434d38cc break dependency of programs/lz4 from lib/liblz4.a
now builds its own object files,
thus offering greater flexibility and control over compilation flags.
2025-05-01 09:29:23 -07:00
Yann Collet 10852ae2b9 stdvars test is sh compatible 2025-04-30 21:26:16 -07:00
Yann Collet 741b9edb31 fixed mingw exe generation 2025-04-30 20:25:23 -07:00
Yann Collet 0944754f4c improve propagation test of standard Makefile variable 2025-04-30 19:31:09 -07:00
Yann Collet a337f582cb fixed StandardVariables test
since quantity of compilation lines displayed has changed with new build macros.
2025-04-30 17:36:43 -07:00
Yann Collet cde9d9c98b fixed: LIBDIR variable name no longer employed in programs/Makefile
since this variable can theoretically be used
to guide some custom installation process of the library.
2025-04-30 17:06:44 -07:00
Yann Collet e77b14f8ad update multiconf.make 2025-04-30 17:06:44 -07:00
Yann Collet d99a5e4d4b apply multiconf to tests 2025-04-30 17:06:44 -07:00
Yann Collet 5387a1595c support *_SRCDIRS 2025-04-30 17:06:44 -07:00
Yann Collet 1d05c07a37 also works for lz4 on Windows (mingw) 2025-04-30 17:06:44 -07:00
Yann Collet 3df0068022 premiere application de multiconf.make
limitee a programs/
2025-04-30 17:06:43 -07:00
Yann Collet c99038d1bb Merge pull request #1610 from Nicoshev/dev
[LZ4] Limit disabling LZ4_FAST_DEC_LOOP to aarch64+clang+android
2025-04-30 15:42:21 -07:00
Nicolas De Carli 51f8af506b Fix missing endif 2025-04-30 18:21:47 -04:00
Nicolas De Carli 0aa33884fa [LZ4] Limit disabling LZ4_FAST_DEC_LOOP to aarch64+clang+android
We've seen modern aarch64 server cpus benefit from LZ4_FAST_DEC_LOOP=1

Previously, LZ4_FAST_DEC_LOOP was disabled when building with clang targeting aarch64. Now we only disable LZ4_FAST_DEC_LOOP if building for Android.
2025-04-30 18:20:53 -04:00
Yann Collet bec9df4ff5 Merge pull request #1607 from lz4/dependabot/github_actions/actions/setup-python-5.6.0
build(deps): bump actions/setup-python from 5.5.0 to 5.6.0
2025-04-28 14:18:55 -07:00
dependabot[bot] 813711e057 build(deps): bump actions/setup-python from 5.5.0 to 5.6.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.5.0 to 5.6.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/8d9ed9ac5c53483de85588cdf95a591a75ab9f55...a26af69be951a213d495a4c3e4e4022e16d87065)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 06:39:20 +00:00
Yann Collet d29f5876c3 Merge pull request #1603 from iwamatsu/update-pkg-config
Add License variable to pkg-config file
2025-04-27 11:41:18 -08:00
Yann Collet 2719f42eb5 removed year from header (#1605)
as it's a burden to maintain, and wasn't consistently updated.

Now rely on git dating.
2025-04-27 10:55:25 -08:00
GeorgH93 7f71be01f2 Update cmake minimum required version (#1601)
Update cmake minimum required version to work with CMake v4 and shut up about the deprecation warning (for cmake_minimum_required < 3.10) on CMake v3.31+
2025-04-27 11:09:49 -07:00
Yann Collet 0915bbc2d4 Merge pull request #1604 from lz4/cmake310_test
Add a cmake 3.10 build and install test
2025-04-27 09:05:06 -08:00
Yann Collet df8abbbbd2 refactor cmake 3.10 test for better maintainability 2025-04-27 09:26:24 -07:00
Yann Collet 26299988fe added a cmake 3.10 build test 2025-04-27 09:14:42 -07:00
Nobuhiro Iwamatsu 5f31f30909 Add License variable to pkg-config file
The pkg-config file has License variable that allows you to set the
license for the software. This sets BSD-2-Clause to License.

Ref: https://github.com/pkgconf/pkgconf/blob/master/man/pc.5#L116
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2025-04-25 16:38:21 +09:00
Yann Collet df6b19dfc2 Merge pull request #1602 from lz4/compile24
updated list of compilers for Github Actions
2025-04-23 04:15:50 -08:00
Yann Collet f99cde984d updated liste of compilers for Github Actions
removed Ubuntu-20, which is no longer supported.
added Ubuntu-24, for more recent compilers.
2025-04-23 04:35:47 -07:00
Yann Collet 67a385a170 Merge pull request #1598 from shubhamhii/gh_1597
AIX build failure fix
2025-04-14 03:22:00 -07:00
shubhamhii e4340e55d3 AIX entry added for POSIX_ENV.
SONAME_FLAGS variable assigned nil string since AIX linker doesn't support soname option.

Closure:#1597
2025-04-10 04:05:06 -05:00
Yann Collet fa1634e2cc Merge pull request #1592 from lz4/dependabot/github_actions/actions/setup-python-5.5.0
build(deps): bump actions/setup-python from 5.4.0 to 5.5.0
2025-03-31 16:42:54 -07:00
dependabot[bot] 7273ab951a build(deps): bump actions/setup-python from 5.4.0 to 5.5.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/42375524e23c412d93fb67b49958b491fce71c38...8d9ed9ac5c53483de85588cdf95a591a75ab9f55)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 06:46:11 +00:00
Yann Collet 836d4c0cd3 Merge pull request #1584 from lz4/dependabot/github_actions/actions/upload-artifact-4.6.2
Bump actions/upload-artifact from 4.6.1 to 4.6.2
2025-03-25 19:23:09 -07:00
Yann Collet a5dde0538d Merge pull request #1586 from louislafosse/fix-examples
fix(segv): add  null pointer assertions for file pointers in example files
2025-03-24 20:50:12 -07:00
Yann Collet c855e122cc Merge pull request #1587 from louislafosse/fix-tests
fix(memory): add memory deallocation for srcBuff in roundTripCheck and loadFile functions
2025-03-24 20:49:24 -07:00
louislafosse 946f062518 fix(memory): add memory deallocation for srcBuff in roundTripCheck and loadFile functions 2025-03-25 02:32:48 +01:00
louislafosse 20bdcaae09 fix(segv): add null pointer assertions for file pointers in example files 2025-03-25 01:28:48 +01:00
dependabot[bot] 2beb8a2d04 Bump actions/upload-artifact from 4.6.1 to 4.6.2
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.1 to 4.6.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1...ea165f8d65b6e75b540449e92b4886f43607fa02)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 06:23:49 +00:00
Toby Nelson 657246ff07 Replaced uint8_t with unsigned char in BYTE typedef for post C99/C++ 2025-03-18 02:39:08 -07:00
Yann Collet 9d53d8bb6c Merge pull request #1576 from lz4/dependabot/github_actions/actions/upload-artifact-4.6.1
Bump actions/upload-artifact from 4.5.0 to 4.6.1
2025-02-25 09:54:47 -08:00
Yann Collet 4806110337 Merge pull request #1577 from lz4/replace1565
Fix theoretical risk of double-free in UTIL_realloc()
2025-02-25 09:31:59 -08:00
Yann Collet f369c3a98e Fix theoretical risk of double-free in UTIL_realloc()
if the function was called with a `0` argument, which is never the case.
replaces #1565
2025-02-25 08:13:52 -08:00
Yann Collet 9b4978ec82 Merge pull request #1578 from lz4/fix_cirrus
fix FreeBSD test on Cirrus CI
2025-02-25 07:48:50 -08:00
Yann Collet b5537fa7e0 fix test-lz4-list.py
an attempt to ensure file list order failed,
because the failing test is expecting the same order between 2 different lists
that end up being sorted differently due to lexical order.

it's too complex to sort out, and not worth the time spent into it so far.
2025-02-24 23:53:14 -08:00
Yann Collet 5edb4bfa22 fixed a minor ubsan warning 2025-02-24 22:26:29 -08:00
Yann Collet 49255ecde4 fix FreeBSD test on Cirrus CI
underlying VM was removed, update to a new version
2025-02-24 18:05:55 -08:00
dependabot[bot] 0e6bf24e23 Bump actions/upload-artifact from 4.5.0 to 4.6.1
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.5.0 to 4.6.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/6f51ac03b9356f520e9adb1b1b7802705f340c2b...4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-24 06:58:08 +00:00
Yann Collet bac0e61001 Merge pull request #1571 from lz4/dependabot/github_actions/actions/setup-python-5.4.0
Bump actions/setup-python from 5.3.0 to 5.4.0
2025-02-03 00:43:06 -08:00
dependabot[bot] 747da578e0 Bump actions/setup-python from 5.3.0 to 5.4.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/0b93645e9fea7318ecaed2b359559ac225c90a2b...42375524e23c412d93fb67b49958b491fce71c38)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-03 06:31:36 +00:00
Yann Collet 5ff3896078 Merge pull request #1568 from eli-schwartz/meson-ossfuzz
meson: fix broken oss-fuzz support
2025-01-28 01:59:14 -08:00
Eli Schwartz af1a58d71e meson: fix broken oss-fuzz support
Regression in original introduction in commit
198e532300.

Every meson file in the repository must have this variable set, to an
appropriate per-file value, in order to cater to the split buildsystem
design where the build files are stored in a subdirectory away from the
source code.

If ossfuzz is enabled, this file is processed and the missing value will
come from some other file instead, which may not be correct.

- Using default values, ossfuzz is enabled but no other subdirs are, other
  than of course lib, which has a coincidentally identical value, and
  everything works.

- If contrib is enabled, it will set the per-file variable to a value
  that is *not* coincidentally the same as ossfuzz.

- If examples is enabled, it will set the per-file variable to a value
  that is coincidentally the same as ossfuzz... and do so later than
  contrib.

So, if contrib is enabled but examples is not, then the ossfuzz
directory fails to process correctly and the build aborts. Fix this by
explicitly adding the correct per-file variable.

Fixes: https://github.com/lz4/lz4/issues/1559
2025-01-27 23:46:31 -05:00
Yann Collet 9527eee2a6 Merge pull request #1567 from lz4/dependabot/github_actions/github/codeql-action-3.28.5
Bump github/codeql-action from 3.27.5 to 3.28.5
2025-01-26 22:44:50 -08:00
dependabot[bot] 52773de420 Bump github/codeql-action from 3.27.5 to 3.28.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.5 to 3.28.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/f09c1c0a94de965c15400f5634aa42fac8fb8f88...f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 06:02:28 +00:00
Yann Collet 07c526c0af Merge pull request #1564 from lz4/filecompress_fix
fixed minor static analyzer warning in fileCompress example
2025-01-16 12:33:06 -08:00
Yann Collet b8af3e2f74 fix fuzzer test
even the _destSize*() variants need a targetDstSize >= 1 to be successful,
since it's the smallest valid payload allowed by LZ4.
2025-01-16 11:47:15 -08:00
Yann Collet 555d294b9b fix flushing single byte 2025-01-13 19:13:22 -08:00
Yann Collet d5362329cd simplified LZ4F_localSaveDict() call pattern
and improves traces a bit
2025-01-13 18:51:58 -08:00
Yann Collet b35b24fb78 improved lz4frame corruption error reporting 2025-01-13 04:45:41 -08:00
Yann Collet 923839bbc9 fixed minor static analyzer warning in fileCompress example 2025-01-12 23:30:55 -08:00
Yann Collet 205fd851dd Merge pull request #1556 from lz4/lz4opt_src0
fix lz4_opt behavior when srcSize == 0
2024-12-23 18:08:48 -08:00
Yann Collet 527431e832 fix minor scan-build warning 2024-12-23 13:30:37 -08:00
Yann Collet de629c38e9 fix modulo 0, part 2 2024-12-23 13:08:39 -08:00
Yann Collet eba7d05b8e fix modulo operation in tests 2024-12-23 11:31:28 -08:00
Yann Collet 9b9e03ff09 lz4hc: centralized input sanitization 2024-12-23 11:27:00 -08:00
Yann Collet 710ed4f0d7 no good reason to FORCE_INLINE 2024-12-23 11:03:24 -08:00
Yann Collet 5c2068c606 fix lz4_opt behavior when srcSize == 0
reported by @rinsuki
2024-12-23 10:46:33 -08:00
Yann Collet 6869ab67d7 Merge pull request #1555 from lz4/dependabot/github_actions/actions/upload-artifact-4.5.0
Bump actions/upload-artifact from 4.4.3 to 4.5.0
2024-12-23 10:16:20 -08:00
dependabot[bot] 7e41965fbb Bump actions/upload-artifact from 4.4.3 to 4.5.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.4.3 to 4.5.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882...6f51ac03b9356f520e9adb1b1b7802705f340c2b)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-23 06:19:55 +00:00
Yann Collet 6cf42afbea Merge pull request #1545 from dearblue/repology
Specify parameters for repology status
2024-11-25 09:00:50 -08:00
Yann Collet 17a8cf523c Merge pull request #1547 from lz4/dependabot/github_actions/github/codeql-action-3.27.5
Bump github/codeql-action from 3.26.2 to 3.27.5
2024-11-25 00:26:46 -08:00
dependabot[bot] 3f7a031e62 Bump github/codeql-action from 3.26.2 to 3.27.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.2 to 3.27.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/429e1977040da7a23b6822b13c129cd1ba93dbb2...f09c1c0a94de965c15400f5634aa42fac8fb8f88)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 06:48:28 +00:00
Yann Collet 8da5d43433 Merge pull request #1544 from t-mat/fix-examples-dictionaryRandomAccess
Fix examples dictionary random access
2024-11-24 08:28:13 -08:00
Yann Collet 0c841277a4 Merge pull request #1546 from lz4/gh_x32_disable
disable x32 tests on Github Actions CI
2024-11-24 07:54:20 -08:00
Yann Collet 11aceb0896 disable x32 tests on Github Actions CI
Since the support was already restricted to older compilers,
it seems this is going away for good.

Testing x32, if deemed necessary, will have to employ other CI.
2024-11-24 06:45:01 -08:00
dearblue 17c36d9c9e Specify parameters for repology status 2024-11-24 18:56:12 +09:00
t-mat 855a097886 chore: Fix dictionaryRandomAccess's issue for small file
When size of the given file is less than 1024 (DICTIONARY_BYTES), dict[] may contain garbage.
Therefore, test_decompress() fails with garbage dictionary.

This change set fixes the failure of test for dictionaryRandomAccess with TESTFILE_SMALL.
2024-11-18 16:43:13 +09:00
t-mat 184ffbd686 chore: Add test for dictionaryRandomAccess
dictionaryRandomAccess doesn't pass this test.
This issue will be fixed in the follow up change set.

Actual failure log:
./dictionaryRandomAccess .gitignore .gitignore 0 32
inp    = [.gitignore]
lz4    = [.gitignore.lz4s-1024]
dec    = [.gitignore.lz4s-1024.dec]
dict   = [.gitignore]
offset = [0]
length = [32]
compress : .gitignore -> .gitignore.lz4s-1024
compress : done
decompress : .gitignore.lz4s-1024 -> .gitignore.lz4s-1024.dec
decompress : done
verify : .gitignore <-> .gitignore.lz4s-1024.dec
verify : NG
2024-11-18 16:42:50 +09:00
Yann Collet 7887022e5d Merge pull request #1510 from ds-sloth/respect-global-pic
CMakeLists.txt: respect global CMAKE_POSITION_INDEPENDENT_CODE flag
2024-11-05 10:59:46 -08:00
Yann Collet c505a48525 Merge pull request #1537 from lz4/dependabot/github_actions/actions/setup-python-5.3.0
Bump actions/setup-python from 5.2.0 to 5.3.0
2024-10-28 16:16:19 -07:00
dependabot[bot] 7f51552ca4 Bump actions/setup-python from 5.2.0 to 5.3.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/f677139bbe7f9c59b41e40162b753c062f5d49a3...0b93645e9fea7318ecaed2b359559ac225c90a2b)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 18:57:35 +00:00
Yann Collet 389c153911 Merge pull request #1538 from lz4/dependabot/github_actions/actions/checkout-4.2.2
Bump actions/checkout from 4.2.1 to 4.2.2
2024-10-28 11:48:45 -07:00
dependabot[bot] 5994fdab5c Bump actions/checkout from 4.2.1 to 4.2.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871...11bd71901bbe5b1630ceea73d27597364c9af683)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 06:43:42 +00:00
Yann Collet d9c01a3d49 Merge pull request #1531 from lz4/dependabot/github_actions/actions/upload-artifact-4.4.3
Bump actions/upload-artifact from 4.4.0 to 4.4.3
2024-10-15 09:36:14 -07:00
Yann Collet 3a90748da5 Merge pull request #1533 from lz4/dependabot/github_actions/actions/checkout-4.2.1
Bump actions/checkout from 4.2.0 to 4.2.1
2024-10-14 18:41:36 -07:00
dependabot[bot] 48f8fe1636 Bump actions/checkout from 4.2.0 to 4.2.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/d632683dd7b4114ad314bca15554477dd762a938...eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-14 06:38:49 +00:00
dependabot[bot] 15833a8260 Bump actions/upload-artifact from 4.4.0 to 4.4.3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.4.0 to 4.4.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/50769540e7f4bd5e21e526ee35c689e35e0d6874...b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-14 06:38:39 +00:00
Yann Collet c612292343 Merge pull request #1524 from bgilbert/freestanding
build/meson: force `LZ4_DEBUG=0` for `tests/freestanding`
2024-10-06 14:37:03 -07:00
Yann Collet b33d5e8e2e Merge pull request #1522 from bgilbert/meson
build/meson: avoid passing long options to `ln`
2024-10-06 12:11:29 -07:00
Yann Collet dc29c67e98 Merge pull request #1523 from bgilbert/uname
build: use `uname -m` to detect processor
2024-10-06 11:05:03 -07:00
Benjamin Gilbert b8f1cc1f07 build/meson: force LZ4_DEBUG=0 for tests/freestanding
Match the Makefile, which never sets LZ4_DEBUG for this test.  If
LZ4_DEBUG is non-zero, lib/lz4.c #includes <assert.h>, the musl version of
which has a conflicting definition for __assert_fail:

    https://www.openwall.com/lists/musl/2019/03/04/6

Fixes build failure:

    ../../../tests/freestanding.c:173:6: error: conflicting types for '__assert_fail'; have 'void(const char *, const char *, unsigned int,  const char *)'
      173 | void __assert_fail(const char * assertion, const char * file, unsigned int line, const char * function) {
          |      ^~~~~~~~~~~~~
    In file included from ../../../tests/../lib/lz4.c:270,
                     from ../../../tests/freestanding.c:49:
    /usr/include/assert.h:19:16: note: previous declaration of '__assert_fail' with type 'void(const char *, const char *, int,  const char *)'
       19 | _Noreturn void __assert_fail (const char *, const char *, int, const char *);
          |                ^~~~~~~~~~~~~
2024-10-06 04:11:36 -07:00
Benjamin Gilbert bc8003bc64 build: use uname -m to detect processor
Ubuntu patches uname -p to return the processor type:

    https://git.launchpad.net/ubuntu/+source/coreutils/tree/debian/patches/80_fedora_sysinfo.patch?h=ubuntu/oracular

and Fedora also did before Fedora 38:

    https://src.fedoraproject.org/rpms/coreutils/c/cd953e11dd78cada371f0389171cea671949141b

but in general, uname -p returns "unknown".  Use uname -m instead.

Fixes build error:

    /usr/bin/ld: /tmp/ccgv9E4e.o: in function `_start':
    freestanding.c:(.text+0x6255a): multiple definition of `_start'; /usr/lib/gcc/x86_64-redhat-linux/14/../../../../lib64/crt1.o:(.text+0x0): first defined here
    collect2: error: ld returned 1 exit status
2024-10-06 03:44:41 -07:00
Benjamin Gilbert 6d17921245 build/meson: avoid passing long options to ln
On macOS, ln only supports short options.
2024-10-06 03:18:27 -07:00
Benjamin Gilbert ac3e03c55c build/meson: update directory path in README 2024-10-06 03:15:38 -07:00
Yann Collet c470f4dae6 Merge pull request #1499 from lz4/dependabot/github_actions/actions/upload-artifact-4.4.0
Bump actions/upload-artifact from 4.3.6 to 4.4.0
2024-10-04 09:43:38 -07:00
Yann Collet c11bf7733b Merge pull request #1497 from rpurdie/dev
lib/Makefile: Fix static library reproducibility
2024-10-01 09:15:55 -07:00
Yann Collet 54f253c1da Merge pull request #1500 from lz4/dependabot/github_actions/actions/setup-python-5.2.0
Bump actions/setup-python from 5.1.1 to 5.2.0
2024-10-01 08:10:01 -07:00
Yann Collet def5c3bd0e Merge pull request #1506 from lz4/clevel_doc
update -H documentation regarding compression levels
2024-10-01 06:46:35 -07:00
dependabot[bot] c14d595b3a Bump actions/setup-python from 5.1.1 to 5.2.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.1.1 to 5.2.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/39cd14951b08e74b54015e9e001cdefcf80e669f...f677139bbe7f9c59b41e40162b753c062f5d49a3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-01 06:19:15 +00:00
Yann Collet 824f7a7ad0 Merge pull request #1508 from lz4/fix_tname
minor: fix test name
2024-09-30 23:12:03 -07:00
Yann Collet 1d99913f5e Merge pull request #1518 from lz4/dependabot/github_actions/actions/checkout-4.2.0
Bump actions/checkout from 4.1.7 to 4.2.0
2024-09-30 23:01:03 -07:00
Yann Collet c5bec79b69 Merge pull request #1520 from dearblue/freebsd-14.1
Update FreeBSD VM image to 14.1
2024-09-30 21:15:26 -07:00
dependabot[bot] 42f0995cd5 Bump actions/checkout from 4.1.7 to 4.2.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.7 to 4.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/692973e3d937129bcbf40652eb9f2f61becf3332...d632683dd7b4114ad314bca15554477dd762a938)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-01 03:40:51 +00:00
Yann Collet 0b33a695e6 Merge pull request #1521 from lz4/fix_vs2022
Fix vs2022
2024-09-30 20:32:46 -07:00
Yann Collet 696aeb1449 fix vs2022 in github actions CI 2024-09-30 17:43:59 -07:00
Yann Collet 5e29e3cb6d switch win32 test to debug
in the hope that optimization errors will not be there.
2024-09-30 17:04:43 -07:00
Yann Collet 032029ccdd enable vs2019 in github actions
see if it works better than current vs2022.
2024-09-30 16:59:59 -07:00
dearblue 4101102391 Update FreeBSD VM image to 14.1
FreeBSD 14.0 will reach the end of life on 2024-09-30.
The updated 14.1 is scheduled to end-of-life on 2025-03-31.

ref. https://www.freebsd.org/releases/14.2R/schedule/
2024-09-30 23:24:24 +09:00
ds-sloth 0e44420380 CMakeLists.txt: use CMAKE_POSITION_INDEPENDENT_CODE to set default only 2024-09-16 19:21:35 -04:00
ds-sloth 80d4c6215a CMakeLists.txt: respect global CMAKE_POSITION_INDEPENDENT_CODE flag 2024-09-11 21:37:35 -04:00
Yann Collet 452f35c3c0 minor: fix test name
obvious insertion mishap
2024-09-07 15:50:10 -07:00
Yann Collet 217bdb2f2f update -H documentation regarding compression levels 2024-09-04 11:03:28 -07:00
dependabot[bot] 1a744ea740 Bump actions/upload-artifact from 4.3.6 to 4.4.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.6 to 4.4.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/834a144ee995460fba8ed112a2fc961b36a5ec5a...50769540e7f4bd5e21e526ee35c689e35e0d6874)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-02 06:47:28 +00:00
Richard Purdie e0b1747860 lib/Makefile: Fix static library reproducibility
The static library contents varies depending of the order of the object
files on disk meaning it isn't reproducible.

To avoid this, use the SRCFILES values which are already sorted, mapped
to the object names instead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-29 11:01:11 +01:00
Yann Collet e0781fbe4b Merge pull request #1493 from lz4/dependabot/github_actions/github/codeql-action-3.26.2
Bump github/codeql-action from 3.25.12 to 3.26.2
2024-08-19 09:34:06 -07:00
dependabot[bot] fdfa68c752 Bump github/codeql-action from 3.25.12 to 3.26.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.12 to 3.26.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/4fa2a7953630fd2f3fb380f21be14ede0169dd4f...429e1977040da7a23b6822b13c129cd1ba93dbb2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 06:51:15 +00:00
Yann Collet cde811e3ef Merge pull request #1491 from lz4/dependabot/github_actions/actions/upload-artifact-4.3.6
Bump actions/upload-artifact from 4.3.5 to 4.3.6
2024-08-12 09:29:11 -07:00
dependabot[bot] 776a8fcd7a Bump actions/upload-artifact from 4.3.5 to 4.3.6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.5 to 4.3.6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/89ef406dd8d7e03cfd12d9e0a4a378f454709029...834a144ee995460fba8ed112a2fc961b36a5ec5a)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 06:19:47 +00:00
Yann Collet 208b2c7d58 Merge pull request #1488 from lz4/dependabot/github_actions/actions/upload-artifact-4.3.5
Bump actions/upload-artifact from 4.3.4 to 4.3.5
2024-08-07 09:45:03 -07:00
dependabot[bot] f6370cf1b3 Bump actions/upload-artifact from 4.3.4 to 4.3.5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.4 to 4.3.5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/0b2256b8c012f0828dc542b3febcab082c67f72b...89ef406dd8d7e03cfd12d9e0a4a378f454709029)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 06:08:38 +00:00
Yann Collet 45fda541f0 Merge pull request #1485 from grobian/meson-no-stdc99
meson: do not force c99 mode
2024-08-03 23:05:47 -07:00
Yann Collet d35f779858 Merge pull request #1487 from lz4/better_ptime
slighly better cpu time measurement for Windows
2024-08-03 10:44:56 -07:00
Yann Collet 6410f177c6 slighly better cpu time measurement for Windows
correctly skips the initialization part of the programs,
so that it's now on par with posix's clock().

In the future, would allow to measure cpu time between arbitrary points in the program execution, though for the time being, it's used for full session.
2024-08-03 09:51:55 -07:00
Yann Collet 7e79c1da1f Merge pull request #1486 from lz4/win_ptime
fix process time counter on Windows for very large files
2024-08-03 00:21:34 -07:00
Yann Collet f7e65802dc fix process time counter on Windows for very large files 2024-08-02 23:39:45 -07:00
Yann Collet 3d946c68aa Merge pull request #1479 from heitbaum/cmake
add back lz4c target but default to OFF
2024-07-30 13:10:42 -07:00
Yann Collet 1c0a090eef Merge pull request #1481 from lz4/doc_T
-h only documents -T# when multithreading is enabled
2024-07-30 13:10:26 -07:00
Yann Collet e8ca3bac3d Merge pull request #1482 from lz4/dependabot/github_actions/ossf/scorecard-action-2.4.0
Bump ossf/scorecard-action from 2.3.3 to 2.4.0
2024-07-30 13:09:46 -07:00
Fabian Groffen bce6a94c25 meson: do not force c99 mode
On Solaris/OpenIndiana hosts forcing (old) C99 means disabling POSIX
2001 functionality, resulting in errors like

In file included from ../../../net/ptah/export/gentoo/working-repos/lz4/programs/bench.c:39:
../../../net/ptah/export/gentoo/working-repos/lz4/programs/util.h: In function  UTIL_getOpenFileSize’:
../../../net/ptah/export/gentoo/working-repos/lz4/programs/util.h:156:23: error: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
  156 | #  define UTIL_fileno fileno
      |                       ^~~~~~
../../../net/ptah/export/gentoo/working-repos/lz4/programs/util.h:325:10: note: in expansion of macro ‘UTIL_fileno’
  325 |     fd = UTIL_fileno(file);
      |          ^~~~~~~~~~~

These can be fixed either by forcing a standard to be applied in programs/platform.h or by not forcing the compiler to use an old standard.

Since CMake and Makefile don't force C99 by default either, just drop it from
meson.build.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2024-07-30 21:50:06 +02:00
dependabot[bot] 451f83b33d Bump ossf/scorecard-action from 2.3.3 to 2.4.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.3 to 2.4.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/dc50aa9510b46c811795eb24b2f1ba02a914e534...62b2cac7ed8198b15735ed49ab1e5cf35480ba46)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 06:45:00 +00:00
Yann Collet fe399506bd Merge pull request #1469 from hhoffstaette/no-sp
Fix building freestanding test with clang & enabled stack protector
2024-07-28 21:32:24 -07:00
Yann Collet 0f273e1868 Merge pull request #1472 from axiqia/dev
Fix file size check in LZ4F_readOpen
2024-07-28 21:32:04 -07:00
Yann Collet 9d298e9540 -h only documents -T# when multithreading is enabled
fixes #1480
2024-07-28 21:30:29 -07:00
Rudi Heitbaum 6969661757 add back lz4c target but default to OFF
Partially revert "removed lz4c target"
This reverts commit 65998fecaf.
2024-07-28 01:26:49 +00:00
Yann Collet d5276bd8f1 Merge pull request #1475 from eltociear/patch-1
docs: update lz4conf.h
2024-07-25 14:53:08 -07:00
Ikko Eltociear Ashimine 7739164446 docs: update lz4conf.h
overriden -> overridden
2024-07-26 01:24:23 +09:00
Shuai Xue 5ec9143e1e Fix file size check in LZ4F_readOpen
When the size of the opened compressed file is less than
LZ4F_HEADER_SIZE_MAX (19) bytes, LZ4F_readOpen() will return an io_read
error code. The minimum compressed file size is LZ4F_HEADER_SIZE_MIN +
LZ4F_ENDMARK_SIZE.

Fix to check the file size with minimum size.

Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
2024-07-24 19:40:52 +08:00
Yann Collet 708fe99cc4 Merge pull request #1471 from lz4/appveyor_nodeploy
remove "deploy" paragraph from Appveyor CI script
2024-07-24 01:18:24 -07:00
Yann Collet 7c2a2606fc Merge pull request #1468 from hhoffstaette/start-alignment
Fix stack alignment of _start() in freestanding test
2024-07-24 01:18:13 -07:00
Yann Collet 58b943cf1e Merge pull request #1470 from dg0yt/cmake
Add an lz4::lz4 target to the exported package
2024-07-24 01:18:00 -07:00
Yann Collet 780f80733a remove "deploy" paragraph from Appveyor CI script
it isn't safe and doesn't work anyway
2024-07-23 14:16:46 -07:00
Kai Pastor ca197e67a0 Add an lz4::lz4 target to the exported package 2024-07-23 20:32:43 +02:00
Holger Hoffstätte d08826c4fd Fix building freestanding test with clang & enabled stack protector
The freestanding test is special as it requires reimplementation of
runtime/toolchain functionality. When building with clang where the
compiler is configured to enable the stack-protector by default,
building fails due to missing __stack_chk_fail symbols.
Thefore disable stack protection specifically for this test.
2024-07-23 13:36:41 +02:00
Holger Hoffstätte 63267a77d8 Fix stack alignment of _start() in freestanding test
When the freestanding test is built with any kind of optimization
that enables vectorized loops, special care must be taken to align
the stack for _start() at a 16-byte boundary.
2024-07-22 22:16:16 +02:00
Yann Collet 68959d27c3 Merge pull request #1460 from lz4/cmake110
removed lz4c target from cmake recipe
2024-07-20 18:43:05 -07:00
Yann Collet 65998fecaf removed lz4c target
should no longer be necessary
2024-07-20 17:26:32 -07:00
Yann Collet 4f33088a32 Merge pull request #1459 from lz4/doc110
update API and man page documentation for v1.10
2024-07-20 17:07:43 -07:00
Yann Collet 36df905aa6 update API and man page documentation for v1.10 2024-07-20 15:21:39 -07:00
Yann Collet 5f0b1d05d1 Merge pull request #1458 from lz4/lorem_faster
Improved Lorem Ipsum generator speed by a factor > x8
2024-07-20 15:20:59 -07:00
Yann Collet de6531b45b fixed minor conversion warning 2024-07-20 14:32:43 -07:00
Yann Collet 8ce9e94cd5 improved lorem ipsum generator speed by a factor > x8 2024-07-20 14:29:58 -07:00
Yann Collet 2a1de07855 improved speed of lorem ipsum generator
by > +80%.

This should help complete tests faster
2024-07-20 12:35:41 -07:00
Yann Collet 18e055e127 Merge pull request #1457 from lz4/L2_dict_lz4f
level 2 compatibility with LZ4F dictionary compression
2024-07-20 11:02:12 -07:00
Yann Collet cc1508f523 more correct extDict detection 2024-07-20 09:22:44 -07:00
Yann Collet 2ea0373b57 level 2 compatibility with LZ4F dictionary compression
LZ4_createCDict() doesn't know the compression level with which it will be used.
Consequently, it's prepared for the "standard" HC mode (i.e. levels 3+).
Unfortunately, the layout of the search tables for this mode is incompatible with level 2 (lz4mid).

Fixed, by making level 2 able to query lz4hc tables from an external dictionary state.
Also, disable the "copy tables" command when the active state is incompatible with the dictionary state.
2024-07-19 23:31:56 -07:00
Yann Collet 1563fff5e5 Merge pull request #1456 from lz4/L2attach
Level 2 is now compatible with dictionary attach mode
2024-07-19 20:19:12 -07:00
Yann Collet 21837b9621 fixed traces 2024-07-19 18:19:07 -07:00
Yann Collet d31aaac2ed Level 2 is now compatible with dictionary attach mode
but it requires that dictionary state is loaded with Level 2
2024-07-19 17:30:33 -07:00
Yann Collet 24d9bb8945 Merge pull request #1454 from lz4/dictL2
Level 2 compatibility with Dictionary compression
2024-07-18 09:13:58 -07:00
Yann Collet be35b7c591 minor documentation edit 2024-07-17 23:57:06 -07:00
Yann Collet 1b12a1515f fix minor conversion warning 2024-07-17 23:02:59 -07:00
Yann Collet f458b2b1a5 LZ4_loadDictHC is compatible with LZ4MID level 2
But the state must have its compression level set _before_ loading the dictionary.
2024-07-17 23:01:08 -07:00
Yann Collet 7480aeed02 added a dictionary loader dedicated to level 2 (LZ4MID) 2024-07-17 12:44:52 -07:00
Yann Collet c1f320fe49 Merge pull request #1453 from lz4/hc_attach
Promote LZ4_attach_HC_dictionary() to stable
2024-07-17 11:57:02 -07:00
Yann Collet 33c62fa67e promote LZ4_attach_HC_dictionary() to stable
as part of the main goal to bring dictionary compression to stable status
2024-07-17 10:50:37 -07:00
Yann Collet 7dce14ab2b Merge pull request #1451 from lz4/changelog_v1_10
update changelog for v1.10
2024-07-17 09:41:32 -07:00
Yann Collet 59209c1f06 Merge pull request #1449 from lz4/codingStyle
added CODING_STYLE documentation
2024-07-17 09:40:53 -07:00
Yann Collet 08bfdbe222 update changelog for v1.10 2024-07-16 17:33:19 -07:00
Yann Collet 0642ae2f1e minor: document version for new entry point 2024-07-16 16:59:33 -07:00
Yann Collet 76c48c1e43 Merge pull request #1443 from lz4/dictAPI
promote dictionary API to stable
2024-07-16 16:08:28 -07:00
Yann Collet 30277ada95 Merge pull request #1445 from lz4/dependabot/github_actions/github/codeql-action-3.25.12
Bump github/codeql-action from 3.25.11 to 3.25.12
2024-07-16 15:22:46 -07:00
Yann Collet e937bf645c Merge pull request #1444 from lz4/dependabot/github_actions/actions/setup-python-5.1.1
Bump actions/setup-python from 5.1.0 to 5.1.1
2024-07-16 14:03:58 -07:00
Yann Collet 089210b078 added CODING_STYLE documentation 2024-07-16 12:37:32 -07:00
Yann Collet 2377636d25 Merge pull request #1447 from lz4/rmVisual
remove Visual Solutions
2024-07-16 07:29:25 -07:00
Yann Collet e519370236 Merge pull request #1448 from lz4/exit_invalid
exit on invalid frame
2024-07-15 23:11:41 -07:00
Yann Collet 4f88c7a49d exit on invalid frame 2024-07-15 21:58:56 -07:00
Yann Collet 6d4d56e826 added runtime tests for binary produced by generated Visual solution 2024-07-15 19:14:34 -07:00
Yann Collet f8432bf801 removed problematic v140 version test 2024-07-15 18:38:00 -07:00
Yann Collet 814d9bead7 fix VS2022 directory for appveyor 2024-07-15 17:17:02 -07:00
Yann Collet 4cc04310c9 remove Visual Solutions
keep VS2022 for the time being,
as several tests still depend on its presence
2024-07-15 16:57:17 -07:00
Yann Collet 8cde298b62 Merge pull request #1446 from lz4/listStdout
Ensure --list output is sent to stdout
2024-07-15 16:31:55 -07:00
Yann Collet b7062669e6 Merge branch 'listStdout' of github.com:lz4/lz4 into listStdout 2024-07-15 13:20:09 -07:00
Yann Collet a2a21bc773 removed failing tests
the complexity of test-lz4-list.py is overkill,
it's unclear why some tests are failing after sending output to stdout instead of stderr,
seems like a fairly obscure parsing logic,
there's no point maintaining that complexity.
2024-07-15 12:01:01 -07:00
Yann Collet 8017ca0ed1 add documentation about decompression side
or rather the absence of a decompression side for _attach_*
2024-07-15 11:48:23 -07:00
Yann Collet 9b72ddfa75 removed failing tests
the complexity of test-lz4-list.py is overkill,
it's unclear why some tests are failing after sending output to stdout instead of stderr,
seems like a fairly obscure parsing logic,
there's no point maintaining that complexity.
2024-07-15 11:37:13 -07:00
Yann Collet 4f25e37a75 --list automatically triggers -m 2024-07-14 23:49:57 -07:00
Yann Collet 470fb1c8bd Merge pull request #1442 from lz4/no_implicit_stdout
removed implicit stdout
2024-07-14 23:46:42 -07:00
dependabot[bot] 397d6846c8 Bump github/codeql-action from 3.25.11 to 3.25.12
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.11 to 3.25.12.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/b611370bb5703a7efb587f9d136a52ea24c5c38c...4fa2a7953630fd2f3fb380f21be14ede0169dd4f)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 06:46:39 +00:00
dependabot[bot] aa6a74837b Bump actions/setup-python from 5.1.0 to 5.1.1
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/82c7e631bb3cdc910f68e0081d67478d79c6982d...39cd14951b08e74b54015e9e001cdefcf80e669f)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 06:46:34 +00:00
Yann Collet 42a43c554a promote LZ4 dictionary API to stable 2024-07-14 13:42:37 -07:00
Yann Collet f580770cf6 Merge pull request #1440 from lz4/vsTests
Generate Visual Studio solutions from cmake
2024-07-14 12:51:50 -07:00
Yann Collet 0990811a9b promote LZ4F dictionary API to stable
closes #791
2024-07-14 12:50:56 -07:00
Yann Collet f42a87c0a4 Merge pull request #1442 from lz4/no_implicit_stdout
removed implicit stdout
2024-07-14 08:22:10 -07:00
Yann Collet 2db419ee23 removed implicit stdout
fixes #1193.

Implicit `stdout` has been a behavior of the `lz4` cli since its early days,
but it ends up being confusing for users, which do not expect this behavior.

The feature is already deprecated, it has been issuing a warning message for several years.
It's time to cut it out.
2024-07-12 22:24:42 -07:00
Yann Collet b20025fd03 minor readability refactor for version extraction logic 2024-07-12 21:21:44 -07:00
Yann Collet f76c979f84 add lz4file.h to include list 2024-07-12 21:11:10 -07:00
Yann Collet e5563ea26c update logic that determines LZ4_BUNDLED_MODE
smaller and hopefully clearer
2024-07-12 19:46:44 -07:00
Yann Collet 6ce6e6da6f improved logic to extract version number 2024-07-12 18:06:13 -07:00
Yann Collet b5139c79d6 do not test gcc/clang flags when building for visual
also: additional warning flags are for debug builds
2024-07-12 08:30:54 -07:00
Yann Collet 32c05eef81 export the generated VS2022 solution as artifact
as a pre-generated project, for users without `cmake` installed
2024-07-11 22:45:55 -07:00
Yann Collet 75391bdfd6 added test for script generating solution on GH
and test resulting compilation in debug mode

and removed visual x64 debug test from appveyor, since it's run from Github Actions,
this will make appveyor a bit faster, and it's the slower test.
2024-07-11 22:04:50 -07:00
Yann Collet d2f2e186cc fixed VS2017 build script 2024-07-11 17:09:03 -07:00
Yann Collet fae5a66b09 provided scripts for other versions of Visual (2015+)
also: automatically detects `cmake` path,
and allows user to override automatic detection.
2024-07-11 17:02:23 -07:00
Yann Collet c292e7dab9 test some scripts to generate visual solutions on Windows 2024-07-11 16:09:50 -07:00
Yann Collet 36fc176001 Merge pull request #1438 from lz4/gpl2orlater
update gpl license text to 2.0-or-later
2024-07-11 10:00:43 -07:00
Yann Collet c5a6e8585d Merge pull request #1410 from lz4/dependabot/github_actions/ossf/scorecard-action-2.3.3
Bump ossf/scorecard-action from 2.3.1 to 2.3.3
2024-07-10 00:25:43 -07:00
Yann Collet 467374a8a1 Merge pull request #1425 from lz4/dependabot/github_actions/github/codeql-action-3.25.11
Bump github/codeql-action from 3.25.1 to 3.25.11
2024-07-09 23:19:18 -07:00
Yann Collet aafb56ee2e update gpl license to 2.0-or-later
The text at the top of each source file was already specifying 2.0-or-later,
but this wasn't clearly reflected in the full-text license in COPYING,
which was the old 2.0 license, which can be interpreted as 2.0-only.

Note that the license of `liblz4`, the library in `lib/` directory,
is unchanged, and remains the more permissive `BSD 2-clause`.
2024-07-10 07:26:20 +02:00
Yann Collet 291c3ae9b2 Merge pull request #1436 from lz4/MT_linkedBlocks
Linked Blocks compression (-BD) can employ multiple threads
2024-07-09 22:10:29 -07:00
Yann Collet 7aaf095dbf disable multithreading when compiling for m68k
there seems to be a bug somewhere, either qemu or pthread, on this target
2024-07-09 22:03:36 +02:00
Yann Collet 4bbb85bb19 Merge pull request #1437 from lz4/dependabot/github_actions/actions/upload-artifact-4.3.4
Bump actions/upload-artifact from 4.3.3 to 4.3.4
2024-07-09 12:57:04 -07:00
Yann Collet e36fadfd44 support multithreading for linked blocks with dictionary 2024-07-09 00:41:16 +02:00
Yann Collet b3dd37f78f fix leak issue 2024-07-09 00:18:49 +02:00
Yann Collet ed4d7d19bd Linked Blocks compression (-BD) can employ multiple threads
but does not support combination with dictionary yet.
2024-07-09 00:18:49 +02:00
Yann Collet 684731c24f Merge pull request #1435 from lz4/lz4_clevel
add support for environment variable LZ4_CLEVEL
2024-07-08 15:17:44 -07:00
Yann Collet c78899a3a2 add support for environment variable LZ4_CLEVEL 2024-07-08 18:48:11 +02:00
Yann Collet 3b2452e5b7 Merge pull request #1434 from lz4/win_multithread
automatically enable multithreading by default on Windows
2024-07-08 09:46:35 -07:00
dependabot[bot] c0e4305932 Bump actions/upload-artifact from 4.3.3 to 4.3.4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.3 to 4.3.4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/65462800fd760344b1a7b4382951275a0abb4808...0b2256b8c012f0828dc542b3febcab082c67f72b)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-08 06:37:19 +00:00
Yann Collet 461881cf4a fixed c90 compliance 2024-07-08 02:47:08 +02:00
Yann Collet 461f369774 automatically enable multithreading by default on Windows
Completion Ports have been supported since basically forever.
2024-07-08 01:24:38 +02:00
Yann Collet 7d3f61b4fa Merge pull request #1433 from lz4/refactor_threadpool_win32
minor threadpool refactor
2024-07-07 16:19:49 -07:00
Yann Collet 32f7fd3f38 minor completion port update
for consistency with pthread implementation
2024-07-07 13:59:44 -07:00
Yann Collet cfdb8ac60b completion ports: minor readability refactor 2024-07-07 13:35:52 -07:00
Yann Collet c688b4bd58 updated threadpool API 2024-07-07 13:22:46 -07:00
Yann Collet 50d541f9e3 simpler execution expression 2024-07-07 11:57:14 -07:00
Yann Collet f0b29a973b updated completion ports logic
jobSlotAvail control job queue size,
end of jobs wait on a single event, instead of busy looping.
2024-07-07 11:45:22 -07:00
Yann Collet 1dc60aa1a2 minor: removed one variable 2024-07-07 09:08:14 -07:00
Yann Collet 2064a28454 Merge pull request #1432 from lz4/cpuload_windows
fix cpuload measurements on Windows
2024-07-06 18:52:32 -07:00
Yann Collet c61c431e57 Merge pull request #1431 from lz4/vs2017_lz4
build: minor: fix lz4 project in VS2017 solution
2024-07-06 17:58:40 -07:00
Yann Collet d1176ac84d Merge pull request #1430 from lz4/mt_control
Control nb threads via environment variable LZ4_NBWORKERS
2024-07-06 17:57:16 -07:00
Yann Collet 5301a75c5a fix cpuload measurements on Windows
clock() does not behave the same (as posix) on Windows
2024-07-06 16:47:05 -07:00
Yann Collet 7ec8526d76 build: minor: fix lz4 project in VS2017 solution 2024-07-07 00:09:36 +02:00
Yann Collet b7b0ee0a54 Add MT control via Environment variable LZ4_NBWORKERS 2024-07-06 23:04:43 +02:00
Yann Collet a6fe6bbd7d Merge pull request #1429 from lz4/completionPorts
Support Multithreading for Windows
2024-07-06 13:12:44 -07:00
Yann Collet 8dd837fd44 document LZ4_NBWORKERS_MAX 2024-07-06 05:11:38 -07:00
Yann Collet 718d1dcad7 warning message when nbThreads above limit 2024-07-06 04:14:39 -07:00
Yann Collet 79e72beeb5 minor optimization: allocate worker array at runtime
this makes it possible to increase LZ4_NBWORKERS_MAX without memory cost
2024-07-06 04:05:28 -07:00
Yann Collet 04341f1974 changed Makefile variable HAVE_THREAD -> HAVE_MULTITHREAD
and updated documentation `programs/README.md`
2024-07-06 01:55:50 -07:00
Yann Collet b5639ade0e fixed Visual Studio type warning 2024-07-06 01:36:19 -07:00
Yann Collet 71ef5b7256 Makefile: automatic MT detection under native msys2/mingw64 2024-07-05 18:52:46 -07:00
Yann Collet 10cc4e38ac fix C90 comment style 2024-07-05 18:25:48 -07:00
Yann Collet 604122c848 Makefile build automatically detect multithreading for Windows 2024-07-05 18:11:37 -07:00
Yann Collet 425cd51aa7 count nb cores on Windows 2024-07-05 18:00:18 -07:00
Yann Collet c7fd52aebc fixed queue size control 2024-07-05 17:38:14 -07:00
Yann Collet 3628163d2a minor: Semaphore init value 2024-07-05 17:16:27 -07:00
Yann Collet 097f0fba84 minor parameter sanitization 2024-07-05 17:11:35 -07:00
Yann Collet b4e3708823 queueLock no longer required 2024-07-05 16:45:07 -07:00
Yann Collet 7183fe9e04 minor simplification
less use of critical section
2024-07-05 14:57:03 -07:00
Yann Collet 9443ed9332 working implementation of completionPorts
to support multithreading and asyncio on Windows
2024-07-05 14:33:14 -07:00
Yann Collet 7646135d0b Merge pull request #1428 from lz4/lz4f_dec_asyncio
Async-IO for LZ4F decompression
2024-07-05 09:58:48 -07:00
Yann Collet 043745887c fixed tsan warnings
and gate some assert() to be triggered only when no TSAN test is ongoing
2024-07-05 13:52:35 +02:00
Yann Collet c379947b61 fix pedantic warning 2024-07-05 11:20:24 +02:00
Yann Collet 2e867a5ab6 fix comments for C90 strict compatibility 2024-07-05 11:19:41 +02:00
Yann Collet 7b4e80481e fix minor cast warnings related to -Wc++-compat
note: it's questionable if the -Wc++-compat flag is really useful for lz4io.
Maybe it should be restricted to `/lib/`.
2024-07-05 11:17:48 +02:00
Yann Collet e9b89073ef optimize asyncio parameters
use less memory, which apparently also improves performance
2024-07-05 02:50:32 +02:00
Yann Collet 091ec2621b implemented ayncio for lz4f decompression 2024-07-05 02:42:21 +02:00
Yann Collet e8e8d4f030 Merge pull request #1426 from lz4/legacy_decode_status
add status update when decompressing legacy frames
2024-07-02 08:17:38 -07:00
Yann Collet 06ce31e7b3 add status update when decompressing legacy frames 2024-07-02 02:39:02 +02:00
dependabot[bot] 03b1a996c4 Bump github/codeql-action from 3.25.1 to 3.25.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.1 to 3.25.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/c7f9125735019aa87cfc361530512d50ea439c71...b611370bb5703a7efb587f9d136a52ea24c5c38c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 06:22:48 +00:00
Yann Collet 5b0ccb8b62 Merge pull request #1424 from lz4/dependabot/github_actions/actions/checkout-4.1.7
Bump actions/checkout from 4.1.6 to 4.1.7
2024-06-17 00:14:42 -07:00
dependabot[bot] 0501c0f4e7 Bump actions/checkout from 4.1.6 to 4.1.7
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/a5ac7e51b41094c92402da3b24376905380afc29...692973e3d937129bcbf40652eb9f2f61becf3332)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 06:32:35 +00:00
Yann Collet 219502c01d Merge pull request #1414 from lz4/dependabot/github_actions/actions/checkout-4.1.6
Bump actions/checkout from 4.1.5 to 4.1.6
2024-06-13 11:18:16 -07:00
Yann Collet e923b08932 Merge pull request #1413 from teo-tsirpanis/lz4-unified-always
[cmake] Always create lz4 target.
2024-06-13 09:35:26 -07:00
Yann Collet ffa1506a89 Merge pull request #1422 from lz4/noFreeBSD132
removed FreeBSD 13.2 test from Cirrus CI
2024-06-12 15:33:47 -07:00
Theodore Tsirpanis 2a7cb5207e Update CMake tests to verify that the unified target always exists. 2024-06-12 22:03:31 +03:00
Yann Collet e554fde064 removed FreeBSD 13.2 test from Cirrus CI
it has been failing for a while and doesn't seem to get fixed.

There is still the FreeBSD 14.0 test running.
2024-06-12 12:02:51 -07:00
Yann Collet d4c24930fc Merge pull request #1418 from t-mat/fix-gh-actions-breaking-change
Fix gh actions breaking change
2024-06-12 11:04:40 -07:00
t-mat e8a09f0511 Fix lib32gcc versions for clang and clang-{8,9,10} 2024-05-27 20:03:04 +09:00
t-mat 5d4a42f89c Fix for gh-actions breaking change
This change set fixes the issue which caused by the following breaking change:
https://github.com/actions/runner-images/issues/9679

- Comment out gcc-13
- Change lib32gcc version for clang-{6.0, 12, 13, 14, 15}
- Add ubuntu-24.04 to lz4-env-info for future changes
2024-05-27 19:48:58 +09:00
dependabot[bot] 5b2af93843 Bump actions/checkout from 4.1.5 to 4.1.6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.5 to 4.1.6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/44c2b7a8a4ea60a981eaca3cf939b5f4305c123b...a5ac7e51b41094c92402da3b24376905380afc29)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-20 06:06:06 +00:00
Theodore Tsirpanis 6aedc2362a [cmake] Always create lz4 target.
See facebook/zstd#3965.
2024-05-18 18:16:46 +03:00
Yann Collet 5e67741616 Merge pull request #1406 from lz4/cmakeSymlinks
[cmake] minor refactor of the symlink installation paragraph
2024-05-13 18:21:13 -07:00
Yann Collet a86338c802 Merge pull request #1408 from lz4/dependabot/github_actions/actions/checkout-4.1.5
Bump actions/checkout from 4.1.4 to 4.1.5
2024-05-13 16:13:42 -07:00
dependabot[bot] a5a46f16ec Bump ossf/scorecard-action from 2.3.1 to 2.3.3
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.1 to 2.3.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/0864cf19026789058feabb7e87baa5f140aac736...dc50aa9510b46c811795eb24b2f1ba02a914e534)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-13 06:40:11 +00:00
dependabot[bot] 15e2f10f62 Bump actions/checkout from 4.1.4 to 4.1.5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.4 to 4.1.5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/0ad4b8fadaa221de15dcec353f45205ec38ea70b...44c2b7a8a4ea60a981eaca3cf939b5f4305c123b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-13 06:40:02 +00:00
Yann Collet bdc8e14e5a [cmake]: just a minor refactor of the symlink installation paragraph
for improved readability.
2024-05-09 16:52:28 -07:00
Yann Collet f8df9dd749 Merge pull request #1395 from ur4t/fix-cli-symlinks
CMake: Separate symlinks creation and installation
2024-05-09 16:42:18 -07:00
Yann Collet c537f782c4 Merge pull request #1401 from Nicoshev/updateFunctionComment
Update function comment
2024-05-08 14:07:49 -07:00
Yann Collet c1501a248f Merge pull request #1405 from AtariDreams/loop
Define mlen = MINMATCH at the start of the loop
2024-05-07 23:02:58 -07:00
Yann Collet 9c038e9f7d Merge pull request #1403 from AtariDreams/one
len should be unsigned
2024-05-07 22:35:50 -07:00
Rose db10b08fc9 len should be unsigned
len will never underflow, as it is already bounds-checked, and casting is potentially another instruction.
2024-05-07 21:35:30 -04:00
Yann Collet 29cd102e09 Merge pull request #1404 from AtariDreams/or
Prefer OR over ADD for splicing numbers from byte-addressed memory
2024-05-07 18:26:11 -07:00
Rose 642f6b8f80 Prefer OR over ADD for splicing numbers from byte-addressed memory 2024-05-07 19:33:28 -04:00
Rose 7f042fc1ed Define mlen = MINMATCH at the start of the loop 2024-05-07 19:22:35 -04:00
Nicolas 9838a0de34 Update function comment 2024-05-05 17:41:16 -07:00
Yann Collet 0f57364a1b Merge pull request #1398 from lz4/dependabot/github_actions/actions/upload-artifact-4.3.3
Bump actions/upload-artifact from 4.3.2 to 4.3.3
2024-04-29 15:58:07 -07:00
Yann Collet 305c9e23a2 Merge pull request #1397 from lz4/dependabot/github_actions/actions/checkout-4.1.4
Bump actions/checkout from 4.1.3 to 4.1.4
2024-04-29 15:37:54 -07:00
dependabot[bot] ae585f7750 Bump actions/upload-artifact from 4.3.2 to 4.3.3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.2 to 4.3.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/1746f4ab65b179e0ea60a494b83293b640dd5bba...65462800fd760344b1a7b4382951275a0abb4808)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 06:55:46 +00:00
dependabot[bot] 6428f91fce Bump actions/checkout from 4.1.3 to 4.1.4
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.3 to 4.1.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/1d96c772d19495a3b5c517cd2bc0cb401ea0529f...0ad4b8fadaa221de15dcec353f45205ec38ea70b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 06:55:42 +00:00
ur4t ba744bd16c CMake: Separate symlinks creation and installation 2024-04-28 17:25:41 +08:00
Yann Collet 7467ddc4c9 Merge pull request #1394 from lz4/dependabot/github_actions/github/codeql-action-3.25.1
Bump github/codeql-action from 3.24.9 to 3.25.1
2024-04-24 09:49:15 -07:00
Yann Collet 0910d97aac Merge pull request #1393 from lz4/dependabot/github_actions/actions/upload-artifact-4.3.2
Bump actions/upload-artifact from 4.3.1 to 4.3.2
2024-04-23 23:01:42 -07:00
Yann Collet dd8ae0b34b Merge pull request #1392 from lz4/dependabot/github_actions/actions/checkout-4.1.3
Bump actions/checkout from 4.1.2 to 4.1.3
2024-04-23 10:56:30 -07:00
dependabot[bot] fb301fa790 Bump github/codeql-action from 3.24.9 to 3.25.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.9 to 3.25.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/1b1aada464948af03b950897e5eb522f92603cc2...c7f9125735019aa87cfc361530512d50ea439c71)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 06:19:00 +00:00
dependabot[bot] 7789c91749 Bump actions/upload-artifact from 4.3.1 to 4.3.2
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.1 to 4.3.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/5d5d22a31266ced268874388b861e4b58bb5c2f3...1746f4ab65b179e0ea60a494b83293b640dd5bba)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 06:18:54 +00:00
dependabot[bot] 667c5b18d4 Bump actions/checkout from 4.1.2 to 4.1.3
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/9bb56186c3b09b4f86b1c65136769dd318469633...1d96c772d19495a3b5c517cd2bc0cb401ea0529f)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 06:18:50 +00:00
Yann Collet b035135b9a Merge pull request #1390 from lz4/bench_out
benchmark results are displayed to stdout
2024-04-16 16:33:59 -07:00
Yann Collet 35264befb8 Merge pull request #1381 from lz4/dependabot/github_actions/github/codeql-action-3.24.9
Bump github/codeql-action from 3.24.7 to 3.24.9
2024-04-04 00:52:31 -07:00
Yann Collet 1a5b83b8c4 benchmark results are displayed to stdout
instead of stderr
2024-04-03 22:49:11 -07:00
Yann Collet 47058197f7 Merge pull request #1384 from RoboSchmied/RoboSchmied-AGfixT74
Fix typo
2024-04-01 14:10:07 -07:00
Yann Collet 39d869620c Merge pull request #1389 from lz4/dependabot/github_actions/actions/setup-python-5.1.0
Bump actions/setup-python from 5.0.0 to 5.1.0
2024-04-01 00:13:14 -07:00
dependabot[bot] 3cd6d01162 Bump actions/setup-python from 5.0.0 to 5.1.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/0a5c61591373683505ea898e09a3ea4f39ef2b9c...82c7e631bb3cdc910f68e0081d67478d79c6982d)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 06:27:38 +00:00
Yann Collet 835d6f9a61 Merge pull request #1383 from jonrumsey/dev
Suppress VS2022 warnings
2024-03-31 13:17:43 -07:00
Yann Collet a1b8ec971c Merge pull request #1388 from lz4/fix/typo-makefile-variables
Fix typo `libzstd` -> `liblz4`
2024-03-31 00:30:57 -07:00
t-mat 5b44fd1e36 Fix typo libzstd -> liblz4 2024-03-31 16:01:38 +09:00
RoboSchmied 993e77f255 Fix: 25 typos
Signed-off-by: RoboSchmied <github@roboschmie.de>
2024-03-26 15:21:45 +01:00
Jon Rumsey 58c3e9dc1d Suppress VS2022 warnings
Suppress compiler warnings that comparands are both constants.
2024-03-26 09:01:40 +00:00
dependabot[bot] e1ccdfcde2 Bump github/codeql-action from 3.24.7 to 3.24.9
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.7 to 3.24.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/3ab4101902695724f9365a384f86c1074d94e18c...1b1aada464948af03b950897e5eb522f92603cc2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 06:14:39 +00:00
Yann Collet 2e33b0c5f7 Merge pull request #1377 from lz4/dependabot/github_actions/github/codeql-action-3.24.7
Bump github/codeql-action from 3.24.6 to 3.24.7
2024-03-22 12:43:52 -07:00
Yann Collet 98a475d11f Merge pull request #1378 from lz4/dependabot/github_actions/actions/checkout-4.1.2
Bump actions/checkout from 4.1.1 to 4.1.2
2024-03-22 11:11:32 -07:00
Yann Collet 643a51caa8 minor: assert successful context creation 2024-03-22 10:34:55 -07:00
Yann Collet 5b4f996e99 Merge pull request #1380 from lz4/fix1374
fix #1374
2024-03-22 09:21:03 -07:00
Yann Collet fab3068680 add test for bug #1374 2024-03-21 23:33:30 -07:00
Yann Collet e50a894154 fix #1374
The output buffer size was sized using the function `LZ4F_compressFrameBound(, NULL)`,
with the mention "cover worst scenario".
That's incorrect : using `, NULL` covers the _default_ scenario,
and there are ways to make the situation worse
by using advanced command line options, starting with `-B4`.
In some limit scenarios, it leads to situations where the output buffer is not large enough.

Switched to determining the main ingredients of LZ4F_preferences_t during initialization
and using actual compression parameters to determine the output buffer size
thus avoiding corner cases where it's under-sized.
2024-03-21 22:43:52 -07:00
dependabot[bot] fc0943e7d2 Bump actions/checkout from 4.1.1 to 4.1.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/b4ffde65f46336ab88eb53be808477a3936bae11...9bb56186c3b09b4f86b1c65136769dd318469633)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 06:23:52 +00:00
dependabot[bot] d8f0e86936 Bump github/codeql-action from 3.24.6 to 3.24.7
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.6 to 3.24.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/8a470fddafa5cbb6266ee11b37ef4d8aae19c571...3ab4101902695724f9365a384f86c1074d94e18c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 06:23:45 +00:00
Yann Collet a3be31154f Merge pull request #1376 from lz4/async_dec
Introduce Async I/O for decompression
2024-03-12 11:38:24 -07:00
Yann Collet 6b88d0a311 fix to please C++ compiler
though I wonder what's the point for units of the CLI program...
2024-03-10 18:14:11 -07:00
Yann Collet 323360009f minor: keep old single-thread code
use compilation variable LZ4IO_MULTITHREAD to switch between the 2
2024-03-10 18:02:25 -07:00
Yann Collet 7a1b70502a fix variable LZ4IO_MULTITHREAD 2024-03-10 17:57:26 -07:00
Yann Collet 43ae8c8545 first implementation of async io for decoder 2024-03-10 17:10:04 -07:00
Yann Collet e0410ac4b6 reorganize mt code 2024-03-10 00:00:49 -08:00
Yann Collet 20c2f3cb64 Merge pull request #1375 from deining/fix-typo
Fix typo
2024-03-08 13:59:45 -08:00
Andreas Deininger 56e80abbfd Fix typo 2024-03-08 22:20:35 +01:00
Yann Collet a07d8125da Merge pull request #1373 from lz4/dependabot/github_actions/github/codeql-action-3.24.6
Bump github/codeql-action from 3.24.3 to 3.24.6
2024-03-04 00:28:57 -08:00
dependabot[bot] a1b741e8b6 Bump github/codeql-action from 3.24.3 to 3.24.6
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.3 to 3.24.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/379614612a29c9e28f31f39a59013eb8012a51f0...8a470fddafa5cbb6266ee11b37ef4d8aae19c571)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 06:22:14 +00:00
Yann Collet 0e4fa244fd Merge pull request #1372 from teo-tsirpanis/unified-target
Add unified CMake target if building only a shared or statric library.
2024-03-01 16:54:56 -08:00
Theodore Tsirpanis e5207e0c19 Add unified CMake target if building only a shared or a statric library. 2024-02-27 21:39:48 +02:00
Yann Collet 610c94f808 Merge pull request #1370 from Razakhel/fix-clang-pedantic-windows
Added preprocessor checks for Clang on Windows
2024-02-24 23:12:00 -08:00
Razakhel be8a4f6522 Added preprocessor checks for Clang on Windows
- MSVC-specific code is used in some places and compiled only if _MSC_VER is set; however, Clang under Windows also defines this, which reports errors on this non-standard code if the -pedantic-errors compiler flag is set
2024-02-22 13:36:12 +01:00
Yann Collet 92dada5d84 Merge pull request #1369 from lz4/lorem2
updated lorem ipsum generator
2024-02-20 16:32:49 -08:00
Yann Collet ed37236307 minor: fix missing include 2024-02-20 15:43:32 -08:00
Yann Collet 1de550fcb5 fixed minor conversion warnings 2024-02-20 15:42:45 -08:00
Yann Collet 718fe2a88b updated lorem ipsum generator
made sentences more complex, by increasing the dictionary count.
It helps reducing the compression ratio towards something closer to real text files.
2024-02-20 14:52:17 -08:00
Yann Collet 6b78465f5b Merge pull request #1367 from lz4/dependabot/github_actions/github/codeql-action-3.24.3
Bump github/codeql-action from 3.24.0 to 3.24.3
2024-02-18 23:07:37 -08:00
dependabot[bot] 1fa72668a6 Bump github/codeql-action from 3.24.0 to 3.24.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.0 to 3.24.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/e8893c57a1f3a2b659b6b55564fdfdbbd2982911...379614612a29c9e28f31f39a59013eb8012a51f0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-19 06:03:12 +00:00
Yann Collet 145f3804ca Merge pull request #1364 from lz4/dependabot/github_actions/actions/upload-artifact-4.3.1
Bump actions/upload-artifact from 4.3.0 to 4.3.1
2024-02-12 00:46:51 -08:00
dependabot[bot] 6423a733a4 Bump actions/upload-artifact from 4.3.0 to 4.3.1
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/26f96dfa697d77e81fd5907df203aa23a56210a8...5d5d22a31266ced268874388b861e4b58bb5c2f3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 06:54:11 +00:00
Yann Collet d219f24d84 Merge pull request #1363 from lz4/level2
LZ4 Level 2
2024-02-10 13:16:28 -08:00
Yann Collet d6765765b8 fix incorrect assert 2024-02-08 14:13:22 -08:00
Yann Collet 80b7db0493 fix overly cautious static analyzer warning 2024-02-08 01:21:57 -08:00
Yann Collet 9712d319be fix inaccurate address overflow condition 2024-02-08 01:07:54 -08:00
Yann Collet 5ccd3347e6 fix out-of-limit match in level 2 2024-02-08 00:40:13 -08:00
Yann Collet 0abb17fd72 fix back limit bug 2024-02-07 16:13:00 -08:00
Yann Collet cc0f287528 fix minor sign comparison warning 2024-02-07 15:34:18 -08:00
Yann Collet 9e8649ef1d removed assert always true 2024-02-07 15:32:26 -08:00
Yann Collet ad204dc099 fix "source has 2 buffers" for level 2
by not searching into the 2nd buffer
which is an inefficiency (less compression opportunities)
but makes the code sensibly simpler to read
and is a use-case avoided by lz4frame.
2024-02-07 15:24:44 -08:00
Yann Collet bde614d894 fix dictionary support for level 2 2024-02-07 15:10:49 -08:00
Yann Collet 65ee88f1c5 fix _destSize() variant for level 2 2024-02-07 14:00:13 -08:00
Yann Collet 5a2516c220 made hash8Ptr compatible with big-endian systems 2024-02-07 01:17:52 -08:00
Yann Collet 3dc0cafe25 minor refactor, for clarity 2024-02-07 00:14:12 -08:00
Yann Collet 7d304b5c77 fill table more 2024-02-07 00:14:12 -08:00
Yann Collet 6774551253 skip over incompressible data 2024-02-07 00:14:12 -08:00
Yann Collet 80026581de long matches look for 7 bytes
instead of 8,
which is _generally_ favorable.
2024-02-07 00:14:12 -08:00
Yann Collet 15ed8113dd fix the hash8 formula 2024-02-07 00:14:12 -08:00
Yann Collet 10921d86c8 another minor compression improvement for level 2
using catch back
2024-02-07 00:14:12 -08:00
Yann Collet 3116d85de3 slightly improved compression ratio of level 2 2024-02-07 00:14:12 -08:00
Yann Collet ee86631034 first implementation of level2
based on 2-hashes strategy
2024-02-07 00:14:12 -08:00
Yann Collet 88c505d49b Merge pull request #1362 from lz4/dependabot/github_actions/github/codeql-action-3.24.0
Bump github/codeql-action from 3.23.2 to 3.24.0
2024-02-06 13:46:06 -08:00
dependabot[bot] 75c9df732a Bump github/codeql-action from 3.23.2 to 3.24.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.23.2 to 3.24.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/b7bf0a3ed3ecfa44160715d7c442788f65f0f923...e8893c57a1f3a2b659b6b55564fdfdbbd2982911)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 06:53:47 +00:00
Yann Collet a3042b9a8e Merge pull request #1359 from lz4/dependabot/github_actions/github/codeql-action-3.23.2
Bump github/codeql-action from 3.23.0 to 3.23.2
2024-01-29 16:25:13 -08:00
Yann Collet ea2166c351 Merge pull request #1360 from lz4/sparc
add sparc compilation test
2024-01-29 15:19:30 -08:00
Yann Collet 372ce8ecd5 switch sparc test to ubuntu-20 2024-01-29 14:11:02 -08:00
Yann Collet 1a39244a89 add sparc compilation test 2024-01-29 14:11:02 -08:00
Yann Collet f34ecf3717 Merge pull request #1361 from lz4/fix_s571
Fix seed 571 test
2024-01-29 14:10:30 -08:00
Yann Collet 95cb4da71e minor: lower literal range
to ensure all characters are printable
2024-01-29 12:55:44 -08:00
Yann Collet e0cfe3eb89 C90 comment style 2024-01-29 12:24:57 -08:00
Yann Collet f8a0a37c1f improve LZ4F dictionary compression in fast mode
and fix the seed 571 test that was failing due to poor efficiency
2024-01-29 12:17:05 -08:00
Yann Collet 10ac725c5e fix init for dictionary compression in HC streaming mode 2024-01-29 10:43:24 -08:00
Yann Collet 358f799b8b Merge pull request #1358 from lz4/dependabot/github_actions/actions/upload-artifact-4.3.0
Bump actions/upload-artifact from 4.2.0 to 4.3.0
2024-01-29 09:56:08 -08:00
dependabot[bot] b108debe58 Bump github/codeql-action from 3.23.0 to 3.23.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.23.0 to 3.23.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/e5f05b81d5b6ff8cfa111c80c22c5fd02a384118...b7bf0a3ed3ecfa44160715d7c442788f65f0f923)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 06:09:19 +00:00
dependabot[bot] 72c1d52017 Bump actions/upload-artifact from 4.2.0 to 4.3.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/694cdabd8bdb0f10b2cea11669e1bf5453eed0a6...26f96dfa697d77e81fd5907df203aa23a56210a8)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 06:09:13 +00:00
Yann Collet 1df82aeefc Merge pull request #1352 from lz4/dependabot/github_actions/actions/upload-artifact-4.2.0
Bump actions/upload-artifact from 4.1.0 to 4.2.0
2024-01-28 18:39:46 -08:00
Yann Collet 642fd65310 Merge pull request #1357 from lz4/loremOut
Datagen uses lorem ipsum generator by default
2024-01-28 17:10:14 -08:00
Yann Collet ef7baa60d4 fixed visual studio solution
and refactor a few minor code comments
2024-01-28 15:33:12 -08:00
Yann Collet 93a905cad4 removed COMPRESSIBILITY_DEFAULT
replaced by `COMPRESSIBILITY_NOT_SET`,
so that it's still possible to request `-P50`.
2024-01-28 15:08:42 -08:00
Yann Collet 72be51731c fixed meson build 2024-01-28 15:00:13 -08:00
Yann Collet 0bac9ab8f9 fixed visual studio projects 2024-01-28 14:24:09 -08:00
Yann Collet 47ffbfd6ef finish generation with a newline character
when there is enough space for it.
2024-01-28 14:19:44 -08:00
Yann Collet 65362838cb datagen uses lorem ipsum generator by default
switches back to statistical generator when specific statistics requested.
2024-01-28 14:05:21 -08:00
Yann Collet 64855b689d Merge pull request #1353 from likema/fix-test-lz4-list
Fix Python 3.6 string interpolation
2024-01-28 13:23:22 -08:00
Yann Collet 7060d374e8 Merge pull request #1356 from lz4/lorem
added a lorem ipsum generator
2024-01-28 13:22:59 -08:00
Yann Collet 5f9a5c6167 fix meson recipe 2024-01-28 12:39:07 -08:00
Yann Collet 69d708dd02 fixed minor unused variable
and refactor implementation notes.
2024-01-28 12:17:23 -08:00
Yann Collet 1511ec685f made lorem slightly less compressible
by favoring small words
2024-01-28 12:09:50 -08:00
Yann Collet e6791b2d46 fix a very picky visual studio warning 2024-01-28 12:09:33 -08:00
Yann Collet 0a1499fbc3 fixed meson formula
datagen is now in tests/
2024-01-28 10:39:42 -08:00
Yann Collet dac61f75ab fixed Visual Studio solutions
datagen is now in tests/
2024-01-28 10:36:59 -08:00
Yann Collet d3b5fe9362 minor optimization
random(range) does no longer use module % operation
2024-01-28 10:32:14 -08:00
Yann Collet 5bc39192e2 fix minor static analyzer warning 2024-01-28 01:17:21 -08:00
Yann Collet 73dd539a6e minor optimizations 2024-01-28 01:10:15 -08:00
Yann Collet 823d37f730 bench.c does not longer need datagen
datagen transferred to tests/
2024-01-28 00:56:56 -08:00
Yann Collet f9eb26664e added a lorem ipsum generator
and use it as primary syntehtic source for the internal benchmark program
2024-01-28 00:35:59 -08:00
Yann Collet 2f3d20730d Merge pull request #1350 from lz4/makedir
change INSTALL_DIR into MAKE_DIR
2024-01-22 22:28:02 -08:00
Like Ma 87ad5e8ac2 Fix Python 3.6 string interpolation 2024-01-23 02:53:29 +08:00
dependabot[bot] 34c22c9a71 Bump actions/upload-artifact from 4.1.0 to 4.2.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/1eb3cb2b3e0f29609092a73eb033bb759a334595...694cdabd8bdb0f10b2cea11669e1bf5453eed0a6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 06:34:16 +00:00
Yann Collet 540b539979 change INSTALL_DIR into MAKE_DIR
INSTALL_DIR is apparently used by cmake
2024-01-20 23:06:14 -08:00
Yann Collet 4cf83dd195 Merge pull request #1348 from lz4/dependabot/github_actions/github/codeql-action-3.23.0
Bump github/codeql-action from 3.22.12 to 3.23.0
2024-01-17 18:53:06 -08:00
Yann Collet 2d92034589 Merge pull request #1349 from lz4/dependabot/github_actions/actions/upload-artifact-4.1.0
Bump actions/upload-artifact from 4.0.0 to 4.1.0
2024-01-17 16:18:55 -08:00
dependabot[bot] a3934332d3 Bump actions/upload-artifact from 4.0.0 to 4.1.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/c7d193f32edcb7bfad88892161225aeda64e9392...1eb3cb2b3e0f29609092a73eb033bb759a334595)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 06:22:29 +00:00
dependabot[bot] f484041cd2 Bump github/codeql-action from 3.22.12 to 3.23.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.22.12 to 3.23.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/012739e5082ff0c22ca6d6ab32e07c36df03c4a4...e5f05b81d5b6ff8cfa111c80c22c5fd02a384118)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 06:22:24 +00:00
Yann Collet 76b07a1878 Merge pull request #1343 from lz4/mt_control2
Compile-time constants
2024-01-01 21:37:00 -08:00
Yann Collet 1230f1ca61 regrouped all compile-time variables into programs/lz4conf.h
also:
updated naming scheme for better consistency
2024-01-01 09:49:22 -08:00
Yann Collet d61b4f1fe2 LZ4IO_MULTITHREADING can be forcefully disabled at compile time 2023-12-31 15:55:53 -08:00
Yann Collet c5e57973ca Merge pull request #1342 from lz4/mt_build_control
Control default nb of threads at compilation time
2023-12-31 15:55:20 -08:00
Yann Collet 0d57b8262e Build variable LZ4_NBTHREADS_DEFAULT
can provide a different default nb of threads at compile time.
2023-12-31 00:18:07 -08:00
Yann Collet 5998622efb Merge pull request #1340 from lz4/msan_gaci
Update CI test suite
2023-12-30 23:58:35 -08:00
Yann Collet 15c30728ea update Github Actions tests
removed redundant tests
2023-12-30 23:02:52 -08:00
Yann Collet 330b9beb81 update cirrus CI FreeBSD tests 2023-12-30 23:01:16 -08:00
Yann Collet 112c788c6b added tsan tests 2023-12-30 23:01:16 -08:00
Yann Collet f4d9a9423f added msan tests to Github Actions 2023-12-30 23:01:16 -08:00
Yann Collet 4b407c3f64 Merge pull request #1336 from lz4/asyncio
Add multi-threading compression
2023-12-30 15:17:48 -08:00
Yann Collet 196e7dbb55 minor optimization: only create thread pools if needed
lz4 skips multithreading for small files.

In a scenario invoking lz4 repetitively on a lot of small files,
processing time goes down from 5.5 sec to 4.5 sec.
2023-12-30 13:50:35 -08:00
Yann Collet 1e4dce4d70 minor optimization : share thread pools
In scenarios where there are many files,
instead of recreating and freeing thread pool for every file
do it once, and share it across all files.

The impact is small, but can be measured:
in a scenario compressing a lot of files of 5 MB at level 1 with 6 threads,
compression time went down from 3 sec to 2.8 sec.
2023-12-30 03:23:34 -08:00
Yann Collet 38f605f3cf adjust tests for more parallelism 2023-12-29 22:25:12 -08:00
Yann Collet 312693ba72 fixed potential leak scenario detected by @t-mat
and a potential double fclose()
2023-12-29 19:33:01 -08:00
Yann Collet bde2e95db7 fixed initialization issue 2023-12-29 18:57:24 -08:00
Yann Collet f3860a1f10 sequential test, for easier debugging 2023-12-29 18:54:33 -08:00
Yann Collet 93a1bc6bba fix leak when input is an exact multiple of job size 2023-12-29 18:22:05 -08:00
Yann Collet 128666662e fix potential leak after failure in legacy format
also:
display time/cpu statistics after legacy compression
2023-12-29 18:07:57 -08:00
Yann Collet 6a3932d1c9 make file open errors recoverable in legacy mode 2023-12-29 16:53:58 -08:00
Yann Collet 8e114d9b9c fix MT compatibility with dictionaries 2023-12-29 16:28:37 -08:00
Yann Collet e9e9beb62e manually select single-thread path with -T1 2023-12-29 14:08:21 -08:00
Yann Collet 1f43e4d191 updated manuals 2023-12-29 14:04:10 -08:00
Yann Collet 0dfbe965d6 report nb of threads in verbose mode 2023-12-29 12:50:43 -08:00
Yann Collet 132c2149c8 removed left-over trace 2023-12-29 12:25:23 -08:00
Yann Collet 88faa801bd second attempt at fixing mingw32 2023-12-29 12:24:24 -08:00
Yann Collet 34e9895cde fixed MT incompatibility with --content-size
also:
provide MT-friendly time measurements for Linux/posix
2023-12-29 12:18:52 -08:00
Yann Collet b45de8b49b attempt to fix mingw32 compilation issues 2023-12-29 11:52:48 -08:00
Yann Collet 2b23260580 removed cancelled declaration
fix oversight
2023-12-29 11:19:06 -08:00
Yann Collet 3bdaad3560 silence some clang x32 test
early versions of clang fail on a heisenbug,
on what seems to be a buggy optimizer issue (disappears with -O0).
later versions have even more issue producing basic functioning executables.
this test seems hard to setup.
might not be worth the trouble.
2023-12-29 02:38:21 -08:00
Yann Collet d7c82ffef1 fixed a few Visual Studio Static Analyzer warnings 2023-12-29 01:18:22 -08:00
Yann Collet e1350f8649 make visual compilation test on appveyor less permissive 2023-12-29 00:24:59 -08:00
Yann Collet 3227a55269 added a simple test for MT CLI commands
and documented the new command.
2023-12-28 22:32:13 -08:00
Yann Collet ef6442b504 fix minor static analyzer warnings
regarding uninitialized variables
2023-12-28 22:06:48 -08:00
Yann Collet f376a90e78 fix VS2022 solution 2023-12-28 21:52:09 -08:00
Yann Collet 5fb1bd2395 fix VS2010 solution
and some minor printf limitations on Windows.
2023-12-28 21:45:03 -08:00
Yann Collet a2d5ce407d fix standard_variables test 2023-12-28 21:30:42 -08:00
Yann Collet 4333be50bc fix minor static analysis initialization warning 2023-12-28 21:25:04 -08:00
Yann Collet c6762ec1c0 fixed meson build
and make it build the MT version of lz4
with an option that is enabled by default but can be disabled on demand.

Also :
- added make target mesonbuild, for easy local build
- made huge tests friendlier to MT variant, for faster testing time
2023-12-28 20:22:23 -08:00
Yann Collet db7495d08b fix another C90 pedantic warning 2023-12-28 18:56:10 -08:00
Yann Collet ee38a8702c fixed several minor pedantic conversion warnings
mostly for C++98 compatibility
(which benefit is dubious, this policy could be revisited)
2023-12-28 18:46:21 -08:00
Yann Collet 94496a90f6 fix pedantic C90 compatibility warnings 2023-12-28 18:32:32 -08:00
Yann Collet bd47756690 lz4io: verbose compress/decompress operations display a summary
featuring time, speed, and cpu usage
2023-12-28 18:04:01 -08:00
Yann Collet a49ca22195 fix cmake recipe
though it still builds single-threaded lz4
2023-12-28 17:14:15 -08:00
Yann Collet ca2e106054 fix minor conversion warnings 2023-12-28 16:51:41 -08:00
Yann Collet 39845fabdc fix minor unused assignment 2023-12-28 16:45:46 -08:00
Yann Collet d169286a9f fixed minor conversion warnings 2023-12-28 16:37:50 -08:00
Yann Collet 4984c7fde6 updated Welcome message to specify if binary support multithreading or not 2023-12-28 16:32:32 -08:00
Yann Collet cbe7211b9c make: fix lz4 mt compilation on linux/posix
now lz4 build defaults to single-thread mode
2023-12-28 16:26:01 -08:00
Yann Collet d3ae8e0e85 fix numCores detection on Linux 2023-12-28 14:04:41 -08:00
Yann Collet f4dda829cc fix minor comparator warning 2023-12-28 13:56:23 -08:00
Yann Collet da5e8b7b0f lz4frame: new API: LZ4F_compressBegin_usingDict()
Note: effectively limited to using the dictionary once for now,
as opposed to once per block when blocks are independent
(no impact when blocks are linked: dictionary is supposed to be used once anyway)

Also :
- clarifies that default lz4frame block size is 64 KB
- refactor LZ4 Frame spec, dictionary paragraph
- updated manual
2023-12-28 13:47:08 -08:00
Yann Collet fd5f76d722 minor traces upgrades
- traces display line number
- errors display traces (debuglevel >= 3)
2023-12-28 00:11:10 -08:00
Yann Collet fc6029f8aa preparation to support linked blocks
currently not active : behave as if blocks are still independent
2023-12-27 23:33:43 -08:00
Yann Collet e58a06d1f9 fixed smaller block sizes 2023-12-27 23:32:38 -08:00
Yann Collet 95c2bc7f1f fix legacy format compression 2023-12-27 23:32:38 -08:00
Yann Collet d4c21a4dd0 fixed stdin support 2023-12-27 23:32:38 -08:00
Yann Collet 815f3550a3 fix frame checksum in MT mode 2023-12-27 23:32:38 -08:00
Yann Collet 3acabda180 multithreading works with lz4f format, but
- no crc
- no stdin support
- no dictionary support
- relatively wasteful resource management
2023-12-27 23:32:38 -08:00
Yann Collet 610baf140f more generic read and write jobs
no longer tied to Legacy format:
receive buffer sizes as parameters.
2023-12-27 23:32:38 -08:00
Yann Collet 553962bd39 better time measurement and reportin 2023-12-27 23:32:37 -08:00
Yann Collet 127fa57895 control over nbThreads
and automatic determination
2023-12-27 23:32:37 -08:00
Yann Collet 8a1c8aa31d first implementation, for compression of legacy format 2023-12-27 23:32:37 -08:00
Yann Collet b239d6afef added a simple (untested) threadpool implementation 2023-12-27 23:32:37 -08:00
Yann Collet 4d72a9efd6 Merge pull request #1333 from lz4/fix1308
fix 1308
2023-12-27 23:32:10 -08:00
Yann Collet 88e477db6b fix 1308
PR #1308 introduces a new symbol, `LZ4_compress_fast_extState_destSize()`,
which, upon inspection, doesn't seem to work as advertised.
In particular, it fails if `dstCapacity` is not large enough,
as opposed to adjusting input size to fit within `dstCapacity`.

Even if it had worked, it would have resulted in problems
for the existing `LZ4_compress_fast_extState()`,
that would have stopped failing when `dstCapacity` is not large enough,
resulting in silent input truncation.

Changed the approach.
It appears the wanted functionality already exists within `lz4` source code,
and is called `LZ4_compress_destSize_extState()`.
It wasn't exposed dues to a (non-verified) problem regarding lz4 state on exit:
it's claimed that since the `_destSize` doesn't completely consume the input,
the state may end up in an "unfinished" status,
making it dangerous to re-employ in later invocations.

Fixed that by enforcing a state initialization at the end of operation.

Also : added some tests,
ensure that `LZ4_compress_fast_extState()` fails as expected when `dstCapacity` is not large enough,
and ensure that `LZ4_compress_destSize_extState()` does succeed in the same circumstance,
by consume less input.

Finally, expose `LZ4_compress_destSize_extState()` as an advanced experimental symbol.
2023-12-27 20:56:27 -08:00
Yann Collet c8673f6d5b Merge pull request #1329 from lz4/dependabot/github_actions/github/codeql-action-3.22.12
Bump github/codeql-action from 3.22.11 to 3.22.12
2023-12-26 14:31:31 -08:00
Yann Collet 67648edb8c Merge pull request #1331 from lz4/man_mt
clarify man page on lz4 CLI being single threaded
2023-12-26 13:36:11 -08:00
Yann Collet af08a062cf clarify man page on lz4 CLI being single threaded.
should properly answer comments in #807
2023-12-26 12:29:53 -08:00
Yann Collet e6b4f27009 Merge pull request #1330 from lz4/fasterfbench
Faster Appveyor CI tests
2023-12-26 11:04:40 -08:00
Yann Collet 3f1eb79f1c Appveyor: Visual: faster compilation for compilation-only tests 2023-12-26 01:03:49 -08:00
Yann Collet efd7029a18 create local_LZ4_decompress_safe() to circumvent dllimport warning
Visual Studio only
2023-12-26 00:41:41 -08:00
Yann Collet 467db788e1 make arrays static 2023-12-26 00:27:56 -08:00
Yann Collet f239a17a6b fix read when requesting out-of-range codec 2023-12-26 00:11:47 -08:00
Yann Collet ded75e76ea fixed minor conversion warning 2023-12-26 00:02:03 -08:00
Yann Collet 4c5858e61c make appveyor ci tests faster
by employing the new -i0 fullbench setting
2023-12-25 23:58:50 -08:00
Yann Collet a03e877bfd fullbench: -i0 runs a very fast (but still measured) run
as opposed to just listing, as it did before,
which is now convered by -l and -h.
2023-12-25 23:57:40 -08:00
Yann Collet f5d14ab9e5 can list algorithms to benchmark
with -l (list only) or as part of -h and -H
2023-12-25 21:00:39 -08:00
Yann Collet d7674fad29 Merge branch 'makefile' into fasterfbench 2023-12-25 20:53:18 -08:00
Yann Collet df3b602a94 array for benched compressors 2023-12-25 11:37:03 -08:00
Yann Collet 6126540827 Merge pull request #1328 from lz4/makefile
Makefile refactor
2023-12-25 11:36:03 -08:00
Yann Collet fde31574e5 fullbench: record benched decompressors into a C90 array
will make listing possible.
2023-12-25 07:56:30 -08:00
Yann Collet 2109153dbe reduce appveyor CI test duration
as we are mostly waiting on Appveyor when running CI tests.
- removed VS2010 tests in favor of shorter CI duration
  + VS2010 is pretty old and deprecated now
- take multiple time traces for analysis
2023-12-25 06:18:25 -08:00
dependabot[bot] 16f33b17ff Bump github/codeql-action from 3.22.11 to 3.22.12
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.22.11 to 3.22.12.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/b374143c1149a9115d881581d29b8390bbcbb59c...012739e5082ff0c22ca6d6ab32e07c36df03c4a4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 06:53:03 +00:00
Yann Collet a37a62f57d update ossfuzz test time
to 300s in CI
(note: lz4 is permanently fuzzed at ossfuzz)
2023-12-24 21:45:05 -08:00
Yann Collet a0abf19ecb fixed -j for versionsTest
Apparently, the `-j` flag for `make` manages to get passed to even a `make` started by python.
2023-12-24 21:09:03 -08:00
Yann Collet f91702fb25 use make -j more often for CI 2023-12-24 20:02:27 -08:00
Yann Collet 5e663b90dd refactor C++ tests 2023-12-24 17:33:07 -08:00
Yann Collet 5c9e349c4a changed test name cpp->cxx
cpp evokes the C PreProcessor, rather than C++
2023-12-24 17:09:52 -08:00
Yann Collet e2e8d9b06b rename USERCFLAGS for consistency 2023-12-24 16:07:10 -08:00
Yann Collet dd7e99917b rename variable LIBDIR for consistency 2023-12-24 16:00:21 -08:00
Yann Collet fc25339a22 rename variable to LIBDIR for consistency 2023-12-24 15:57:54 -08:00
Yann Collet 631cd0f6fd minor adjustments for examples/Makefile 2023-12-23 13:22:41 -08:00
Yann Collet 7b7cecd14a fix attempt for ppc64 test on circleci 2023-12-23 01:05:53 -08:00
Yann Collet cecb7f0491 versionsTest: pass variables via MOREFLAGS
for older versions of `lz4` that may require it
2023-12-22 23:33:42 -08:00
Yann Collet 669e2559d3 add traces to versionsTest 2023-12-22 23:02:11 -08:00
Yann Collet 736bcf76d6 minor CI adjustments 2023-12-22 20:32:30 -08:00
Yann Collet 098a987de0 fix circleci tests
that were relying on MOREFLAGS
2023-12-22 20:16:02 -08:00
Yann Collet 6bdfc56c9a fix minor conversion warnings on macos 2023-12-22 20:11:12 -08:00
Yann Collet 26b3b238fe Merge pull request #1253 from ltrk2/bugfix/hashing-on-big-endian
Make hashes identical between LE and BE platforms
2023-12-22 17:45:25 -08:00
Yann Collet 48db0b23e4 abiTests fixes 2023-12-22 12:00:19 -08:00
Yann Collet a467d7eb33 abiTest : add more traces and messages 2023-12-22 11:19:56 -08:00
Yann Collet 63e73c152e adding traces to abiTest to better observe potential issues 2023-12-22 10:29:16 -08:00
Yann Collet bbe41f4039 attempt to fix abi Test 2023-12-22 00:52:12 -08:00
Yann Collet 6b5f56629e adjust speed python test 2023-12-22 00:45:53 -08:00
Yann Collet 1ec11b1b91 adjust appveyor windows test
CFLAGS must be set becore execution
2023-12-22 00:43:37 -08:00
Yann Collet e760561c8a adjust test-lz4-speed for absence of MOREFLAGS 2023-12-22 00:35:22 -08:00
Yann Collet 6beb1a6b53 adjust appveyor tests for absence of MOREFLAGS 2023-12-22 00:31:44 -08:00
Yann Collet 968134d6e7 adjust Github Actions tests for absence of MOREFLAGS 2023-12-22 00:30:05 -08:00
Yann Collet da955d7160 streamlines tests/Makefile clean logic
also:
- stricter (more complete) .PHONY declaration
2023-12-21 22:09:54 -08:00
Yann Collet c952eafbf5 centralized clean logic for lib/Makefile
also:
- stricter target classification (`.PHONY`, `CLEAN`)
- user provided CFLAGS are appended, hence have higher priority
  + `-O3` is no longer automatically disabled when user provides CFLAGS
2023-12-21 18:50:28 -08:00
Yann Collet fe18314de0 more thorough target classification for programs/Makefile
also:
- target `all` also produces symlinks `unlz4` and `lz4cat`
- user-provided `CFLAGS` are appended, so have higher priority
- `-O3` is no longer erased when `CFLAGS` is provided via environment variables
- No more usage of non-standard `MOREFLAGS`
- Better centralized `clean` logic
  + as a consequence of noticing that Windows' Makefile doesn't necessarily $(EXT) suffix to properly delete executable
2023-12-21 18:04:19 -08:00
Yann Collet cfe11daa5e Merge pull request #1327 from lz4/lz4file_err
minor: lz4file API provides more accurate error codes
2023-12-21 17:40:47 -08:00
Yann Collet 854d13a168 fix uninitialized memory 2023-12-21 16:58:24 -08:00
Yann Collet 6b9fc5fe68 minor: C90 comment style 2023-12-21 15:48:01 -08:00
Yann Collet 863cf7cbed streamline free logic 2023-12-21 15:20:30 -08:00
Yann Collet 00ad605bdf lz4file API returns more accurate error codes 2023-12-21 14:38:31 -08:00
Yann Collet 06b2287804 very minor conversion warning fix
and ignore more build artifacts
2023-12-21 14:01:39 -08:00
Yann Collet 8975f07d0f Merge pull request #1326 from lz4/install_noCreation
ensure make install target doesn't create files
2023-12-21 09:24:28 -08:00
Yann Collet 4e8788eddc ensure make install target doesn't create files
if preceded by a standard make command
2023-12-21 00:11:52 -08:00
Yann Collet 640865da9b Merge pull request #1325 from lz4/fixConvDouble
fix minor conversion warnings
2023-12-20 08:43:25 -08:00
Yann Collet dc474bd84a fix minor conversion warnings
appearing with clang-17
2023-12-19 23:11:29 -08:00
Yann Collet 68bc4c32f8 Merge pull request #1324 from lz4/appveyor_clang
refactor appveyor.yml
2023-12-19 22:34:54 -08:00
Yann Collet 38b7377b32 refactor appveyor.yml
The clang test definition is really weird.
Make it more understandable.

Tests definition and execution should remain mostly identical.
2023-12-19 20:00:38 -08:00
Yann Collet 77e54ea5f9 Merge pull request #1322 from lz4/minor1
Minor refactor
2023-12-18 16:16:33 -08:00
Yann Collet 375b81d463 Merge pull request #1308 from tristan957/glib
Add LZ4_compress_fast_extState_destSize() API
2023-12-18 12:32:16 -08:00
Yann Collet 977b03122b Merge pull request #1320 from lz4/dependabot/github_actions/github/codeql-action-3.22.11
Bump github/codeql-action from 2.22.9 to 3.22.11
2023-12-18 11:46:16 -08:00
Yann Collet b3152bc90c Merge pull request #1321 from lz4/dependabot/github_actions/actions/upload-artifact-4.0.0
Bump actions/upload-artifact from 3.1.3 to 4.0.0
2023-12-18 09:52:47 -08:00
dependabot[bot] 167623d721 Bump actions/upload-artifact from 3.1.3 to 4.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.3 to 4.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/a8a3f3ad30e3422c9c7b888a15615d19a852ae32...c7d193f32edcb7bfad88892161225aeda64e9392)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 06:49:04 +00:00
dependabot[bot] 675be9821b Bump github/codeql-action from 2.22.9 to 3.22.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.9 to 3.22.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/c0d1daa7f7e14667747d73a7dbbe8c074bc8bfe2...b374143c1149a9115d881581d29b8390bbcbb59c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 06:49:00 +00:00
Yann Collet cd7ce04a09 missing clean target 2023-12-17 15:26:53 -08:00
Yann Collet e2cb69c7ea SED can be defined on command line and with environment variables 2023-12-17 15:25:51 -08:00
Yann Collet e52a82644f link final binary rather than copy
whenever possible (i.e. posix)
2023-12-17 15:23:22 -08:00
Yann Collet a86d5c8131 avoid accidental redefinition of LZ4_STATIC_LINKING_ONLY 2023-12-17 15:21:06 -08:00
Yann Collet b8fd2d1530 Merge pull request #1314 from lz4/deprecateCommentUpdate
updated code documentation
2023-12-12 15:24:05 -08:00
Yann Collet 2b2c829fa0 Merge pull request #1315 from lz4/dependabot/github_actions/github/codeql-action-2.22.9
Bump github/codeql-action from 2.22.8 to 2.22.9
2023-12-12 09:27:02 -08:00
Yann Collet 0e4be29911 Merge pull request #1316 from lz4/dependabot/github_actions/actions/setup-python-5.0.0
Bump actions/setup-python from 4.7.1 to 5.0.0
2023-12-11 13:19:07 -08:00
dependabot[bot] acf06f1cf4 Bump actions/setup-python from 4.7.1 to 5.0.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.7.1 to 5.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236...0a5c61591373683505ea898e09a3ea4f39ef2b9c)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 06:41:24 +00:00
dependabot[bot] b6eef8da38 Bump github/codeql-action from 2.22.8 to 2.22.9
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.8 to 2.22.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/407ffafae6a767df3e0230c3df91b6443ae8df75...c0d1daa7f7e14667747d73a7dbbe8c074bc8bfe2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 06:41:20 +00:00
Yann Collet 33cd40d1dd Merge pull request #1311 from lz4/dependabot/github_actions/github/codeql-action-2.22.8
Bump github/codeql-action from 2.22.5 to 2.22.8
2023-12-07 23:29:15 -08:00
Yann Collet a2e4da3ec3 updated code documentation
notably around migration advisese from deprecated function.

fix #1310.
2023-12-07 16:14:37 -08:00
Yann Collet 5be782a10b Merge pull request #1312 from JunHe77/rvl
decomp: refine read_variable_length codegen layout
2023-12-07 15:48:43 -08:00
Jun He 629ba802c8 decomp: refine read_variable_length codegen layout
The probability of multiple-bytes length is low.
Split the first byte extraction from the loop,
add hint of comparison to get more pipeline friendly
code, and move the reset of loop to a seperate cold
path. See: https://godbolt.org/z/z4jd5z7z9

Change-Id: Ic93ae717954574435357fdb84624d00b0c280331
Signed-off-by: Jun He <jun.he@arm.com>
2023-12-05 17:15:23 +08:00
dependabot[bot] d09975f33a Bump github/codeql-action from 2.22.5 to 2.22.8
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.5 to 2.22.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/74483a38d39275f33fcff5f35b679b5ca4a26a99...407ffafae6a767df3e0230c3df91b6443ae8df75)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 06:27:36 +00:00
Tristan Partin ee25fc2812 Add LZ4_compress_fast_extState_destSize() API
Allow a user to provide an external state, but also understand how much
of the source buffer was compressed.
2023-11-13 02:36:24 -06:00
Yann Collet 4032c8c787 Merge pull request #1306 from lz4/dependabot/github_actions/ossf/scorecard-action-2.3.1
Bump ossf/scorecard-action from 2.3.0 to 2.3.1
2023-10-30 23:51:42 -07:00
Yann Collet f672069c74 Merge pull request #1305 from lz4/dependabot/github_actions/github/codeql-action-2.22.5
Bump github/codeql-action from 2.22.4 to 2.22.5
2023-10-30 22:56:22 -07:00
dependabot[bot] aa9c54ec99 Bump ossf/scorecard-action from 2.3.0 to 2.3.1
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/483ef80eb98fb506c348f7d62e28055e49fe2398...0864cf19026789058feabb7e87baa5f140aac736)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 06:24:01 +00:00
dependabot[bot] d9ed2c0641 Bump github/codeql-action from 2.22.4 to 2.22.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.4 to 2.22.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/49abf0ba24d0b7953cb586944e918a0b92074c80...74483a38d39275f33fcff5f35b679b5ca4a26a99)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 06:23:56 +00:00
Yann Collet 039ab46965 Merge pull request #1301 from JunHe77/clang-gen
lz4: remove unnecessary check of ip
2023-10-24 09:23:47 -07:00
Jun He 84a1e9c273 lz4: remove unnecessary check of ip
ip has been advanced before the match finder loop,
so (ip>anchor) will be always true before entering
the loop.
This change generates better codegen with clang.

Change-Id: I2567cb7f4a16cc28496fc88c07dcd99601bc97b3
Signed-off-by: Jun He <jun.he@arm.com>
2023-10-24 13:36:41 +08:00
Yann Collet 2b755f4594 Merge pull request #1302 from lz4/dependabot/github_actions/github/codeql-action-2.22.4
Bump github/codeql-action from 2.22.3 to 2.22.4
2023-10-23 21:28:05 -07:00
Yann Collet e10b67430c Merge pull request #1303 from lz4/dependabot/github_actions/actions/checkout-4.1.1
Bump actions/checkout from 4.1.0 to 4.1.1
2023-10-23 18:35:43 -07:00
Yann Collet abcb3e09a9 Merge pull request #1298 from Hamlin-Li/enable-riscv64-support
Enable basic support for riscv64
2023-10-23 09:50:24 -07:00
dependabot[bot] 9c7c87d8c0 Bump actions/checkout from 4.1.0 to 4.1.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/8ade135a41bc03ea155e62e844d188df1ea18608...b4ffde65f46336ab88eb53be808477a3936bae11)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 06:40:49 +00:00
dependabot[bot] 64b7f0b7ba Bump github/codeql-action from 2.22.3 to 2.22.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.3 to 2.22.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/0116bc2df50751f9724a2e35ef1f24d22f90e4e1...49abf0ba24d0b7953cb586944e918a0b92074c80)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 06:40:41 +00:00
Yann Collet 0e4b22ddc9 updated NEWS and raised version number
to ensure `dev` version is not confused with release v1.9.4
2023-10-20 12:38:44 -07:00
hamlin 212da692ea Fix compiler preprocessor 2023-10-20 09:42:35 +00:00
Hamlin Li 9c23889059 Merge branch 'lz4:dev' into enable-riscv64-support 2023-10-20 10:09:47 +01:00
Yann Collet 5e70eaae78 Merge pull request #1299 from lz4/emuTargets
added new qemu targets for CI (MIPS, M68K, RISC-V)
2023-10-19 13:28:55 -07:00
Yann Collet 8de247b2ff added new qemu targets for CI (MIPS, M68K, RISC-V) 2023-10-19 11:27:05 -07:00
Yann Collet 943cd67111 Merge pull request #1296 from lz4/dependabot/github_actions/github/codeql-action-2.22.3
Bump github/codeql-action from 2.22.0 to 2.22.3
2023-10-18 23:37:42 -07:00
Yann Collet 8189417c74 Merge pull request #1297 from LocalSpook/addnullcheck
Add null pointer check before `FREEMEM()`
2023-10-18 16:22:00 -07:00
hamlin 39734d2fe5 Enable basic support on riscv64 2023-10-17 14:50:48 +00:00
Yann Collet 462c8e86de Merge pull request #1294 from LocalSpook/wpedantic
Use `-Wpedantic` instead of `-pedantic` for consistency with other `-W*` options
2023-10-16 19:50:25 -07:00
LocalSpook 9fa9bf264a Add null pointer check before FREEMEM() 2023-10-16 17:53:54 -07:00
Yann Collet 6d12994f1e Merge pull request #1287 from LocalSpook/clang-format
Introduce the `.clang-format` rule file
2023-10-16 02:39:32 -07:00
dependabot[bot] 3743fcf259 Bump github/codeql-action from 2.22.0 to 2.22.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.0 to 2.22.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/2cb752a87e96af96708ab57187ab6372ee1973ab...0116bc2df50751f9724a2e35ef1f24d22f90e4e1)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 06:37:37 +00:00
Yann Collet 215dac378e Merge pull request #1291 from LocalSpook/meson-whitespace
Make Meson version number parsing more robust
2023-10-13 16:27:52 -07:00
Yann Collet e2bea9ebcb Merge pull request #1290 from LocalSpook/makefile-whitespace
Make Makefile version number parsing more robust
2023-10-13 09:06:54 -07:00
LocalSpook f99c4382c7 Use -Wpedantic instead of -pedantic 2023-10-12 20:49:02 -07:00
Yann Collet 66dc666f28 Merge pull request #1289 from LocalSpook/cmake-whitespace
Make CMake version number parsing more robust
2023-10-12 16:05:02 -07:00
Yann Collet 3e49598768 Merge pull request #1288 from LocalSpook/gitignore
Ignore Visual Studio Code files in `.gitignore`
2023-10-12 13:05:17 -07:00
Yann Collet bc25196ddc Merge pull request #1292 from t-mat/fix/fix-pr-1286
fix: fix PR #1286
2023-10-12 07:35:42 -07:00
Takayuki Matsuoka 7c50ac9983 fix: fix PR #1286
Add missing `--target install`.
Without this parameter, the following cmake tests fail to find cmake configuration files.
2023-10-12 19:22:52 +09:00
LocalSpook e270f2edd9 Make Makefile version number parsing more robust 2023-10-11 18:58:47 -07:00
LocalSpook b389bbf5fc Make Meson version number parsing more robust 2023-10-11 18:51:50 -07:00
LocalSpook 47daa7efdb Make CMake version number parsing more robust 2023-10-11 18:49:16 -07:00
LocalSpook 86e43fd27c Ignore Visual Studio Code files in .gitignore 2023-10-11 18:42:51 -07:00
LocalSpook 0f43297492 Introduce .clang-format rule file 2023-10-11 17:27:37 -07:00
Yann Collet c235ead586 Merge pull request #1286 from t-mat/fix/test-for-1281
cmake static lib test (ci.yml)
2023-10-11 11:18:12 -07:00
Yann Collet 12a72d746b Merge pull request #1285 from t-mat/fix/msvc-17.7
chore: suppress warning C6385 for MSVC 17.7
2023-10-11 11:17:45 -07:00
Yann Collet 4514340312 Merge pull request #1281 from t-mat/fix/issue-1269
fix: issue #1269
2023-10-09 16:06:52 -07:00
Yann Collet 2032166b76 Merge pull request #1282 from lz4/dependabot/github_actions/github/codeql-action-2.22.0
Bump github/codeql-action from 2.21.9 to 2.22.0
2023-10-09 09:56:27 -07:00
Yann Collet 1169969476 Merge pull request #1283 from lz4/dependabot/github_actions/actions/setup-python-4.7.1
Bump actions/setup-python from 4.7.0 to 4.7.1
2023-10-09 08:52:26 -07:00
Yann Collet c1c547ab6b Merge pull request #1284 from lz4/dependabot/github_actions/ossf/scorecard-action-2.3.0
Bump ossf/scorecard-action from 2.2.0 to 2.3.0
2023-10-09 06:08:55 -07:00
Takayuki Matsuoka 2acec86445 add: cmake static lib test
This changeset is follow-up for #1281.
To checks #1269, this PR adds actual static library build test for cmake.
2023-10-09 16:49:44 +09:00
Takayuki Matsuoka 5ba4803d76 chore: suppress warning C6385 for MSVC 17.7
- MSVC 17.7 has been released[1].
- Its new _MSC_VER is 1937.
- We're still hitting same false positive warnings.

[1] https://devblogs.microsoft.com/visualstudio/visual-studio-2022-17-7-now-available/
2023-10-09 16:12:57 +09:00
dependabot[bot] 952c503195 Bump ossf/scorecard-action from 2.2.0 to 2.3.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/08b4669551908b1024bb425080c797723083c031...483ef80eb98fb506c348f7d62e28055e49fe2398)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 06:52:36 +00:00
dependabot[bot] 0ea3257393 Bump actions/setup-python from 4.7.0 to 4.7.1
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.7.0 to 4.7.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/61a6322f88396a6271a6ee3565807d608ecaddd1...65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 06:52:30 +00:00
dependabot[bot] 496eb37f48 Bump github/codeql-action from 2.21.9 to 2.22.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.9 to 2.22.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/ddccb873888234080b77e9bc2d4764d5ccaaccf9...2cb752a87e96af96708ab57187ab6372ee1973ab)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 06:52:23 +00:00
Takayuki Matsuoka e92efba7f7 fix: issue #1269
Since `lz4/programs/Makefile:SRCFILES` explicitly contains source code of lz4 CLI and liblz4, `CMakeLists.txt` must follow this settings.

It also means, lz4 CLI and legacy lz4c must avoid to use `liblz4`.
2023-10-08 22:34:53 +09:00
Yann Collet 149d17e2b0 Merge pull request #1279 from lz4/dependabot/github_actions/github/codeql-action-2.21.9
Bump github/codeql-action from 2.21.7 to 2.21.9
2023-10-02 10:32:02 -07:00
Yann Collet 72e7ab8188 Merge pull request #1280 from lz4/dependabot/github_actions/actions/checkout-4.1.0
Bump actions/checkout from 4.0.0 to 4.1.0
2023-10-02 09:21:23 -07:00
dependabot[bot] 42c95e9292 Bump actions/checkout from 4.0.0 to 4.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...8ade135a41bc03ea155e62e844d188df1ea18608)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 06:29:52 +00:00
dependabot[bot] 0b7dc8bbd6 Bump github/codeql-action from 2.21.7 to 2.21.9
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.7 to 2.21.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/04daf014b50eaf774287bf3f0f1869d4b4c4b913...ddccb873888234080b77e9bc2d4764d5ccaaccf9)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 06:29:45 +00:00
Yann Collet 5fc0630a0e Merge pull request #1273 from pnacht/scorecard
Add Scorecard Action
2023-09-30 01:00:10 -07:00
Pedro Kaj Kjellerup Nacht 21600596eb Add Scorecard Action
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2023-09-27 14:29:09 -07:00
Yann Collet f41eb5f720 Merge pull request #1277 from lz4/fixExamples
fix examples
2023-09-26 14:48:27 -07:00
Yann Collet a985b3fee3 Merge pull request #1274 from lz4/dependabot/github_actions/actions/checkout-4.1.0
Bump actions/checkout from 4.0.0 to 4.1.0
2023-09-26 14:46:53 -07:00
Yann Collet fa834730d0 fixed meson build 2023-09-26 13:05:58 -07:00
dependabot[bot] 0b8dc466cf Bump actions/checkout from 4.0.0 to 4.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/3df4ab11eba7bda6032a0b82a6bb43b11571feac...8ade135a41bc03ea155e62e844d188df1ea18608)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-26 19:57:07 +00:00
Yann Collet 8586d6a1b2 fix example for low resolution timers 2023-09-26 12:56:56 -07:00
Yann Collet 6ea2ed7fb3 removed cxxtest
replaced by -Wc++-compat
2023-09-26 12:56:56 -07:00
Yann Collet 65d3772592 fix minor c++ compat warning 2023-09-26 12:56:56 -07:00
Yann Collet 67532ae3c5 fix examples
streamlined Makefile.
avoid usage of -lrt (problematic for portability).
now bench_functions (renamed) can be part of `make test`.

fix #1276
2023-09-26 12:56:56 -07:00
Yann Collet bacc80abcc Merge pull request #1278 from lz4/fix_x32_ci
fix x32 CI tests
2023-09-26 12:56:09 -07:00
Yann Collet ac8d683af6 removed x32 tests from inter-version-abi-test 2023-09-26 09:39:57 -07:00
Yann Collet b21ba41ca6 fix x32 CI tests
Github Actions is failing x32 binaries with recent versions of Ubuntu (22.04, latest)
2023-09-26 09:34:18 -07:00
Yann Collet dbabdb2959 Merge pull request #1268 from lz4/fix1227
Fix #1227
2023-09-15 14:53:19 -07:00
Yann Collet 05d77ab132 minor comment update for x32 ABI
as suggested by @svenha in #1213
2023-09-12 13:55:52 -07:00
ltrk2 4387beefe6 Improve the README 2023-08-15 14:14:35 -07:00
ltrk2 eef01f7791 Hide the functionality behind a feature flag and document it 2023-08-15 14:13:05 -07:00
ltrk2 b6d94d24bc Make hashes identical between LE and BE platforms 2023-07-19 09:37:37 -07:00
155 changed files with 9188 additions and 7938 deletions
+6 -11
View File
@@ -43,26 +43,21 @@ jobs:
# Test
# This would typically be a build job when using workflows, possibly combined with build
# This is based on your 1.0 configuration file or project settings
- run: CFLAGS= make clangtest && make clean
- run: g++ -v; make cxxtest && make clean
- run: gcc -v; g++ -v; make ctocpptest && make clean
- run: CC=clang CFLAGS="-Werror -O0" make all && make clean
- run: c++ -v; make cxxtest V=1 && make clean
- run: cc -v; c++ -v; make ctocxxtest && make clean
- run: gcc-5 -v; CC=gcc-5 CFLAGS="-O2 -Werror" make check && make clean
- run: gcc-5 -v; CC=gcc-5 CFLAGS="-O2 -m32 -Werror" CPPFLAGS=-I/usr/include/x86_64-linux-gnu make check && make clean
- run: gcc-6 -v; CC=gcc-6 MOREFLAGS="-O2 -Werror" make check && make clean
- run: make cmake && make clean
- run: gcc-6 -v; CC=gcc-6 CFLAGS="-O2 -Werror" make check && make clean
- run: make cmakebuild && make clean
- run: make -C tests test-lz4
- run: make -C tests test-lz4c
- run: make -C tests test-frametest
- run: make -C tests test-fuzzer && make clean
- run: make -C lib all && make clean
- run: pyenv global 3.4.4; make versionsTest MOREFLAGS=-I/usr/include/x86_64-linux-gnu && make clean
- run: pyenv global 3.14; CPPFLAGS=-I/usr/include/x86_64-linux-gnu make versionsTest && make clean
- run: make test-install && make clean
- run: gcc -v; CFLAGS="-O2 -m32 -Werror" CPPFLAGS=-I/usr/include/x86_64-linux-gnu make check && make clean
- run: clang -v; make staticAnalyze && make clean
- run: make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static && make clean
- run: make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS=-m64 && make clean
- run: make platformTest CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static && make clean
- run: make platformTest CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static && make clean
# Teardown
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# Save test results
-5
View File
@@ -1,5 +0,0 @@
freebsd_instance:
image_family: freebsd-12-2
task:
script: pkg install -y gmake && gmake test
+132
View File
@@ -0,0 +1,132 @@
# This is the configuration file for clang-format, an automatic code formatter.
# Introduction: https://clang.llvm.org/docs/ClangFormat.html
# Supported options: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
Language: Cpp
Standard: Latest
ColumnLimit: 110
UseTab: Never
IndentWidth: 4
PPIndentWidth: 2
ContinuationIndentWidth: 4
LineEnding: LF
InsertNewlineAtEOF: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
IndentCaseBlocks: false
IndentCaseLabels: false
IndentGotoLabels: false
IndentPPDirectives: AfterHash
IndentWrappedFunctionNames: false
AlignAfterOpenBracket: Align
AlignArrayOfStructures: Right
AlignEscapedNewlines: Left
AlignOperands: Align
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveBitFields:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignTrailingComments:
Kind: Leave
OverEmptyLines: 0
BinPackArguments: true
BinPackParameters: false
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
BraceWrapping:
AfterCaseLabel: false
AfterControlStatement: Never
AfterEnum: false
AfterExternBlock: false
AfterFunction: true
AfterStruct: false
AfterUnion: false
BeforeElse: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
BreakAfterAttributes: Never
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
DerivePointerAlignment: false
PointerAlignment: Left
QualifierAlignment: Custom
QualifierOrder: ["inline", "static", "volatile", "restrict", "const", "type"]
ReflowComments: false
BreakStringLiterals: false
RemoveSemicolon: true
RemoveParentheses: ReturnStatement
InsertBraces: false
SeparateDefinitionBlocks: Always
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeParens: ControlStatements
BitFieldColonSpacing: Both
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 1
SpacesInSquareBrackets: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SortIncludes: Never
IncludeBlocks: Preserve
IncludeIsMainRegex: ""
IncludeCategories:
- {Regex: "<.*>", Priority: -2, CaseSensitive: true}
- {Regex: "\".*\"", Priority: -1, CaseSensitive: true}
AttributeMacros: ["__capability"]
StatementAttributeLikeMacros: []
StatementMacros: []
PenaltyBreakAssignment: 200
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyExcessCharacter: 10
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 60
+1 -1
View File
@@ -4,4 +4,4 @@ updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
interval: monthly
+32 -25
View File
@@ -1,10 +1,39 @@
This directory contains [GitHub Actions](https://github.com/features/actions) workflow files.
# Workflow Organization
The CI/CD workflows are organized into focused, maintainable files:
## Core Testing Workflows
- **`compilers.yml`** - Tests compatibility across different C compilers (GCC, Clang versions)
- **`core-tests.yml`** - Core LZ4 functionality testing (benchmarks, fuzzing, frame format, ABI compatibility, etc.)
- **`sanitizers.yml`** - Memory safety testing (AddressSanitizer, MemorySanitizer, UBSan, ThreadSanitizer)
## Platform & Build System Testing
- **`cross-platform.yml`** - Cross-platform testing using QEMU emulation and native macOS builds
- **`build-systems.yml`** - Alternative build systems (Visual Studio, Meson)
- **`cmake-test.yml`** - CMake build system testing
## Code Quality & Analysis
- **`code-quality.yml`** - Static analysis tools (cppcheck, scan-build, valgrind, unicode lint)
- **`oss-fuzz.yml`** - OSS-Fuzz integration for continuous fuzzing
## Utilities & Environment
- **`release-environment.yml`** - Release validation and environment information gathering
- **`scorecard.yml`** - Security scorecard analysis
This organization provides:
- **Better maintainability** - Changes to specific test categories only affect relevant files
- **Improved parallelization** - Workflows run independently and in parallel
- **Clearer failure isolation** - Easier to identify which types of tests are failing
- **Enhanced readability** - Each workflow has a single, clear responsibility
# Known issues
## USAN, ASAN (`lz4-ubsan-x64`, `lz4-ubsan-x86`, `lz4-asan-x64`)
## Sanitizers (UBSan, ASan) - `sanitizers.yml`
For now, `lz4-ubsan-*` uses the `-fsanitize-recover=pointer-overflow` flag:
### UBSan (UndefinedBehaviorSanitizer)
For now, UBSan tests use the `-fsanitize-recover=pointer-overflow` flag:
there are known cases of pointer overflow arithmetic within `lz4.c` fast compression.
These cases are not dangerous with known architecture,
but they are not guaranteed to work by the C standard,
@@ -18,32 +47,10 @@ not active anywhere today.
Therefore, a more acceptable work-around will have to be found first.
## cppcheck (`lz4-cppcheck`)
## cppcheck - `code-quality.yml`
This test script ignores the exit code of `make cppcheck`.
Because this project doesn't 100% follow their recommendation.
Also sometimes it reports false positives.
# Notes
- You can investigate various information at the right pane of GitHub
Actions report page.
| Item | Section in the right pane |
| ------------------------- | ------------------------------------- |
| OS, VM | Set up job |
| git repo, commit hash | Run actions/checkout@v2 |
| Version of tools | Environment info |
# Difference with `.travis.yml`
The following tests are not be included due to limitation of GH-Actions.
- name: aarch64 real-hw tests
- name: PPC64LE real-hw tests
- name: IBM s390x real-hw tests
+109
View File
@@ -0,0 +1,109 @@
# Build system testing (Visual Studio, Meson)
name: Build Systems
on:
push:
pull_request:
permissions:
contents: read
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
windows-visual-studio:
name: ${{ matrix.system.os }} Visual Studio
runs-on: ${{ matrix.system.os }}
strategy:
fail-fast: false
matrix:
system:
- { os: windows-2022, build_path: ".\\build\\VS2022" }
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Build Win32 Debug
# Switching to debug mode, since vs2022 optimizations seem to introduce a bug since July 2024
run: |
pushd ${{ matrix.system.build_path }}
.\\build-and-test-win32-debug.bat
popd
- name: Build x64 Debug
# Switching to debug mode, since vs2022 optimizations seem to introduce a bug since July 2024
run: |
pushd ${{ matrix.system.build_path }}
.\\build-and-test-x64-debug.bat
popd
- name: Generate VS solution
run: |
pushd ".\\build\\visual"
.\\generate_vs2022.cmd
popd
- name: Upload generated VS2022 directory
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: VS2022-Build-Dir
path: "build/visual/Visual Studio 17 2022"
- name: Build executable with generated solution
run: cmake --build "build/visual/Visual Studio 17 2022" --config Debug
- name: Run minimal runtime test
run: |
& ".\\build\\visual\\Visual Studio 17 2022\\Debug\\lz4.exe" -vvV
& ".\\build\\visual\\Visual Studio 17 2022\\Debug\\lz4.exe" -bi1
& ".\\build\\visual\\Visual Studio 17 2022\\Debug\\lz4.exe" ".\\build\\visual\\Visual Studio 17 2022\\Debug\\lz4.exe"
& ".\\build\\visual\\Visual Studio 17 2022\\Debug\\lz4.exe" -t ".\\build\\visual\\Visual Studio 17 2022\\Debug\\lz4.exe.lz4"
meson:
name: Meson + Ninja
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install tree ninja-build
python -m pip install --upgrade pip
pip3 install --user meson
- name: Display environment info
run: |
type clang && which clang && clang --version
type python && which python && python --version
type meson && which meson && meson --version
- name: Configure build
run: >
meson setup
--fatal-meson-warnings
--buildtype=debug
-Db_lundef=false
-Dauto_features=enabled
-Dprograms=true
-Dcontrib=true
-Dtests=true
-Dexamples=true
build/meson builddir
- name: Run tests
run: meson test -C builddir
- name: Test installation
run: |
cd builddir
DESTDIR=./staging ninja install
tree ./staging
-817
View File
@@ -1,817 +0,0 @@
# For details, see README.md in this directory.
###############################################################
# C compilers
#
# - gcc
# - clang
#
# Known Issue
# - All test cases which described as 'fail' must be fixed and replaced with 'true'.
# - gcc-11 (x32, x86) : "../lib/lz4hc.c:148: LZ4HC_countBack: Assertion `(size_t)(match - mMin) < (1U<<31)' failed."
# - all clangs (x32, x86) : "../lib/lz4hc.c:282: int LZ4HC_InsertAndGetWiderMatch(...): Assertion `matchPtr >= lowPrefixPtr' failed."
#
name: lz4 CI
on: [push, pull_request]
permissions:
contents: read
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.head_ref }}
jobs:
lz4-c-compilers:
name: CC=${{ matrix.cc }}, ${{ matrix.os }}
strategy:
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed.
matrix:
include: [
# You can access the following values via ${{ matrix.??? }}
#
# pkgs : apt-get package names. It can include multiple package names which are delimited by space.
# cc : C compiler executable.
# cxx : C++ compiler executable for `make ctocpptest`.
# x32 : Set 'true' if compiler supports x32. Otherwise, set 'false'.
# Set 'fail' if it supports x32 but fails for now. 'fail' cases must be removed.
# x86 : Set 'true' if compiler supports x86 (-m32). Otherwise, set 'false'.
# Set 'fail' if it supports x86 but fails for now. 'fail' cases must be removed.
# cxxtest : Set 'true' if it can be compiled as C++ code. Otherwise, set 'false'.
# freestanding : Set 'true' if it can be compiled and execute freestanding code. Otherwise, set 'false'.
# Usually, it requires Linux, x86_64 and gcc/g++.
# os : GitHub Actions YAML workflow label. See https://github.com/actions/virtual-environments#available-environments
# cc
{ pkgs: '', cc: cc, cxx: c++, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'true', os: ubuntu-latest, },
# gcc
{ pkgs: '', cc: gcc, cxx: g++, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'true', os: ubuntu-latest, },
{ pkgs: 'gcc-13 g++-13 lib32gcc-13-dev libx32gcc-13-dev', cc: gcc-13, cxx: g++-13, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'true', os: ubuntu-22.04, },
{ pkgs: 'gcc-12 g++-12 lib32gcc-12-dev libx32gcc-12-dev', cc: gcc-12, cxx: g++-12, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'true', os: ubuntu-22.04, },
{ pkgs: 'gcc-11 g++-11 lib32gcc-11-dev libx32gcc-11-dev', cc: gcc-11, cxx: g++-11, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'true', os: ubuntu-22.04, },
{ pkgs: 'gcc-10 g++-10 lib32gcc-10-dev libx32gcc-10-dev', cc: gcc-10, cxx: g++-10, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'true', os: ubuntu-22.04, },
{ pkgs: 'gcc-9 g++-9 lib32gcc-9-dev libx32gcc-9-dev', cc: gcc-9, cxx: g++-9, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'true', os: ubuntu-22.04, },
{ pkgs: 'gcc-8 g++-8 lib32gcc-8-dev libx32gcc-8-dev', cc: gcc-8, cxx: g++-8, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'true', os: ubuntu-20.04, },
{ pkgs: 'gcc-7 g++-7 lib32gcc-7-dev libx32gcc-7-dev', cc: gcc-7, cxx: g++-7, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'true', os: ubuntu-20.04, },
# clang
{ pkgs: 'lib32gcc-11-dev libx32gcc-11-dev', cc: clang, cxx: clang++, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'false', os: ubuntu-latest, },
{ pkgs: 'clang-15 lib32gcc-12-dev libx32gcc-12-dev', cc: clang-15, cxx: clang++-15, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'false', os: ubuntu-22.04, },
{ pkgs: 'clang-14 lib32gcc-11-dev libx32gcc-11-dev', cc: clang-14, cxx: clang++-14, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'false', os: ubuntu-22.04, },
{ pkgs: 'clang-13 lib32gcc-11-dev libx32gcc-11-dev', cc: clang-13, cxx: clang++-13, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'false', os: ubuntu-22.04, },
{ pkgs: 'clang-12 lib32gcc-12-dev libx32gcc-12-dev', cc: clang-12, cxx: clang++-12, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'false', os: ubuntu-22.04, },
{ pkgs: 'clang-11 lib32gcc-12-dev libx32gcc-12-dev', cc: clang-11, cxx: clang++-11, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'false', os: ubuntu-22.04, },
{ pkgs: 'clang-10 lib32gcc-11-dev libx32gcc-11-dev', cc: clang-10, cxx: clang++-10, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'false', os: ubuntu-20.04, },
{ pkgs: 'clang-9 lib32gcc-11-dev libx32gcc-11-dev', cc: clang-9, cxx: clang++-9, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'false', os: ubuntu-20.04, },
{ pkgs: 'clang-8 lib32gcc-11-dev libx32gcc-11-dev', cc: clang-8, cxx: clang++-8, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'false', os: ubuntu-20.04, },
{ pkgs: 'clang-7 lib32gcc-7-dev libx32gcc-7-dev', cc: clang-7, cxx: clang++-7, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'false', os: ubuntu-20.04, },
{ pkgs: 'clang-6.0 lib32gcc-11-dev libx32gcc-11-dev', cc: clang-6.0, cxx: clang++-6.0, x32: 'true', x86: 'true', cxxtest: 'true', freestanding: 'false', os: ubuntu-20.04, },
]
runs-on: ${{ matrix.os }}
env: # Set environment variables
# We globally set CC and CXX to improve compatibility
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
FIXME__LZ4_CI_IGNORE : ' echo Error. But we ignore it for now.'
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: apt-get install
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
sudo apt-get install ${{ matrix.pkgs }}
- name: Environment info
run: |
echo && type $CC && which $CC && $CC --version
echo && type $CXX && which $CXX && $CXX --version
- name: make
if: always()
run: make V=1
- name: install test
if: always()
run: make clean; make V=1 -C tests test-install
- name: make all
if: always()
run: make V=1 clean all
- name: make c_standards (C90)
if: always()
run: make V=1 clean c_standards_c90
- name: make c_standards (C11)
if: always()
run: make V=1 clean c_standards_c11
- name: make c-to-c++
if: always()
run: make V=1 clean ctocpptest
- name: make cxxtest
if: ${{ matrix.cxxtest == 'true' }}
run: make V=1 clean cxxtest
- name: make test-freestanding
if: ${{ matrix.freestanding == 'true' }}
run: make V=1 clean test-freestanding
- name: make -C programs default
if: always()
run: make V=1 -C programs clean default
- name: make -C programs default -D_FORTIFY_SOURCE=2
if: always()
run: CFLAGS='-fPIC' LDFLAGS='-pie -fPIE -D_FORTIFY_SOURCE=2' make V=1 -C programs clean default
- name: make -C tests test-lz4
if: always()
run: make clean; MOREFLAGS='-Werror' make -j V=1 -C tests test-lz4
- name: make clangtest (clang only)
if: ${{ startsWith( matrix.cc , 'clang' ) }}
run: make V=1 clean clangtest
- name: make -C tests test MOREFLAGS='-mx32'
if: ${{ matrix.x32 == 'true' }}
run: make clean; LDFLAGS='-Wl,--verbose' MOREFLAGS='-mx32' make -j V=1 -C tests test
- name: make -C tests test-lz4c32
if: ${{ matrix.x86 == 'true' }}
run: LDFLAGS='-Wl,--verbose' MOREFLAGS='-Werror' make V=1 -C tests clean test-lz4c32
###############################################################
# #
# Remove this block when we stabilize the tests. #
# #
- name: make -C tests test MOREFLAGS='-mx32' || echo Ignore failure for now.
if: ${{ matrix.x32 == 'fail' }}
run: make clean; LDFLAGS='-Wl,--verbose' MOREFLAGS='-mx32' make -j V=1 -C tests test || $FIXME__LZ4_CI_IGNORE
- name: make -C tests test-lz4c32 || echo Ignore failure for now.
if: ${{ matrix.x86 == 'fail' }}
run: make clean; LDFLAGS='-Wl,--verbose' MOREFLAGS='-Werror' make V=1 -C tests test-lz4c32 || $FIXME__LZ4_CI_IGNORE
# #
###############################################################
###############################################################
# LZ4 self tests
#
# - Benchmark
# - Fuzzer
# - LZ4 Frame
# - LZ4 versions
# - Custom LZ4_DISTANCE_MAX
#
lz4-benchmark:
name: Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: apt-get install
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: benchmark (-C tests test-lz4)
run: make -j V=1 -C tests test-lz4
- name: benchmark (-C tests test-lz4c)
run: make -j V=1 -C tests test-lz4c
- name: benchmark (-C tests test-lz4c32)
run: make V=1 -C tests test-lz4c32
- name: benchmark (-C tests test-fullbench)
run: make V=1 -C tests test-fullbench
- name: benchmark (-C tests test-fullbench32)
run: make V=1 -C tests test-fullbench32
lz4-fuzzer:
name: Fuzzer test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: apt-get install
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: setup
run: sudo sysctl -w vm.mmap_min_addr=4096
- name: fuzzer
run: make V=1 -C tests test-fuzzer
- name: fuzzer32
run: make V=1 -C tests test-fuzzer32
lz4-standard-makefile-variables:
name: LZ4 Makefile - support for standard variables
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: make standard_variables
run: make V=1 standard_variables
lz4-versions:
name: LZ4 versions test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: apt-get install
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: make -C tests versionsTest
run: make V=1 -C tests versionsTest
lz4-abi:
name: LZ4 inter-versions ABI test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: apt-get install
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: make -C tests abiTests
run: make V=1 -C tests abiTests
lz4-frame:
name: LZ4 frame test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: apt-get install
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: LZ4 frame test
run: make V=1 -C tests test-frametest
- name: LZ4 frame test (32-bit)
run: make V=1 -C tests test-frametest32
lz4-memory-usage:
name: test different values of LZ4_MEMORY_USAGE
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: LZ4_MEMORY_USAGE
run: make V=1 -C tests test-compile-with-lz4-memory-usage
# Custom LZ4_DISTANCE_MAX ; lz4-wlib (CLI linked to dynamic library); LZ4_USER_MEMORY_FUNCTIONS
lz4-custom-distance:
name: Custom LZ4_DISTANCE_MAX
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: custom LZ4_DISTANCE_MAX; test LZ4_USER_MEMORY_FUNCTIONS
run: |
MOREFLAGS='-DLZ4_DISTANCE_MAX=8000' make V=1 check
make V=1 clean
make V=1 -C programs lz4-wlib
make V=1 clean
make V=1 -C tests fullbench-wmalloc # test LZ4_USER_MEMORY_FUNCTIONS
make V=1 clean
CC="c++ -Wno-deprecated" make V=1 -C tests fullbench-wmalloc # stricter function signature check
# test block device compression #1086
lz4cli-block-device:
name: Test lz4 compression on a block device
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: create a block device, compress it with lz4 # alternative : blindly use /dev/loop0, seems to always exist
run: |
make lz4
dd if=/dev/zero of=full0.img bs=2M count=1
BLOCK_DEVICE=$(sudo losetup --show -fP full0.img)
sudo chmod 666 $BLOCK_DEVICE
./lz4 -v $BLOCK_DEVICE -c > /dev/null
sudo losetup -d $BLOCK_DEVICE
rm full0.img
###############################################################
# Check tools
#
# - cppcheck
# - scan-build
# - valgrind
# - ubsan
# - asan
# - unicode-lint
# - build examples
#
lz4-cppcheck:
name: make cppcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: apt-get install
run: |
sudo apt-get update
sudo apt-get install cppcheck
- name: Environment info
run: echo && type cppcheck && which cppcheck && cppcheck --version
- name: cppcheck
# This test script ignores the exit code of cppcheck.
# See known issues in README.md.
run: make V=1 clean cppcheck || echo There are some cppcheck reports but we ignore it.
lz4-scan-build:
name: make staticAnalyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: apt-get install
run: |
sudo apt-get update
sudo apt-get install clang-tools
- name: Environment info
run: |
echo && type gcc && which gcc && gcc --version
echo && type clang && which clang && clang --version
echo && type scan-build && which scan-build # scan-build doesn't have any --version equivalent option
echo && type make && which make && make -v
echo && cat /proc/cpuinfo || echo /proc/cpuinfo is not present
- name: make staticAnalyze
run: make V=1 clean staticAnalyze
lz4-valgrind:
name: valgrind
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: apt-get install
run: |
sudo apt-get update
sudo apt-get install valgrind
- name: Environment info
run: |
echo && type cc && which cc && cc --version
echo && type valgrind && which valgrind && valgrind --version
- name: valgrind
run: make V=1 -C tests test-mem
lz4-ubsan-x64:
name: Linux x64 ubsan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: ubsan
run: |
make clean
make V=1 usan
lz4-ubsan-x86:
name: Linux x86 ubsan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: apt-get install
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
sudo apt-get install lib32gcc-11-dev
- name: ubsan32
run: |
make clean
CC=clang make V=1 usan32
lz4-asan-x64:
name: Linux x64 ASAN
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: setup
run: sudo sysctl -w vm.mmap_min_addr=4096
- name: frametest
run: CC=clang MOREFLAGS=-fsanitize=address make V=1 -C tests clean test-frametest
- name: fuzzer
run: CC=clang MOREFLAGS=-fsanitize=address make V=1 -C tests clean test-fuzzer
unicode-lint:
name: lint unicode in ./lib/, ./tests/ and ./programs/
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: unicode lint
run: bash ./tests/unicode_lint.sh
lz4-examples:
name: make examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: apt-get install
run: |
sudo apt-get update
- name: Environment info
run: |
echo && type cc && which cc && cc --version
echo && type c++ && which c++ && c++ --version
- name: examples
run: make V=1 clean examples
- name: examples (compile as C++ code)
run: make V=1 -C examples clean cxxtest
# lasts ~20mn
oss-fuzz:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sanitizer: [address, undefined, memory]
steps:
- name: Build Fuzzers (${{ matrix.sanitizer }})
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'lz4'
dry-run: false
sanitizer: ${{ matrix.sanitizer }}
- name: Run Fuzzers (${{ matrix.sanitizer }})
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'lz4'
fuzz-seconds: 600
dry-run: false
sanitizer: ${{ matrix.sanitizer }}
- name: Upload Crash
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # https://github.com/actions/upload-artifact v3.1.3
if: failure() && steps.build.outcome == 'success'
with:
name: ${{ matrix.sanitizer }}-artifacts
path: ./out/artifacts
###############################################################
# Platforms
#
# - QEMU (ARM, ARM64, PPC, PPC64LE, S390X)
# - macOS
# - Windows
#
# QEMU
# All tests use QEMU (static) and gcc cross compiler.
#
# note:
# We don't employ completely matrix method which provides `MOREFLAGS`
# etc in the matrix. Because some platform may need its special
# compiler options and test.
# For example, xxHash already has tests for scalar and SIMD version of
# it. But compiler options are quite different between platforms.
#
# So, please keep them simple and independent.
#
lz4-qemu-platforms:
name: QEMU ${{ matrix.type }}
strategy:
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix instance failed.
matrix:
include: [
# You can access the following values via ${{ matrix.??? }}
# type : Architecture type for `if:` statement.
# pkgs : apt-get package names. You can include multiple packages which are delimited by space.
# xcc : gcc cross C compiler executable.
# xemu : QEMU static emulator executable.
# os : GitHub Actions YAML workflow label. See https://github.com/actions/virtual-environments#available-environments
{ type: ARM, pkgs: 'qemu-system-arm gcc-arm-linux-gnueabi', xcc: arm-linux-gnueabi-gcc, xemu: qemu-arm-static, os: ubuntu-latest, },
{ type: ARM64, pkgs: 'qemu-system-arm gcc-aarch64-linux-gnu', xcc: aarch64-linux-gnu-gcc, xemu: qemu-aarch64-static, os: ubuntu-latest, },
{ type: PPC, pkgs: 'qemu-system-ppc gcc-powerpc-linux-gnu', xcc: powerpc-linux-gnu-gcc, xemu: qemu-ppc-static, os: ubuntu-latest, },
{ type: PPC64LE, pkgs: 'qemu-system-ppc gcc-powerpc64le-linux-gnu', xcc: powerpc64le-linux-gnu-gcc, xemu: qemu-ppc64le-static, os: ubuntu-latest, },
{ type: S390X, pkgs: 'qemu-system-s390x gcc-s390x-linux-gnu', xcc: s390x-linux-gnu-gcc, xemu: qemu-s390x-static, os: ubuntu-latest, },
]
runs-on: ${{ matrix.os }}
env: # Set environment variables
XCC: ${{ matrix.xcc }}
XEMU: ${{ matrix.xemu }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: apt-get install
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
sudo apt-get install qemu-utils qemu-user-static
sudo apt-get install ${{ matrix.pkgs }}
- name: Environment info
run: |
echo && type $XCC && which $XCC && $XCC --version
echo && $XCC -v # Show built-in specs
echo && type $XEMU && which $XEMU && $XEMU --version
- name: ARM64
if: ${{ matrix.type == 'ARM64' }}
run: make V=1 platformTest CC=$XCC QEMU_SYS=$XEMU
- name: ARM
if: ${{ matrix.type == 'ARM' }}
run: make V=1 platformTest CC=$XCC QEMU_SYS=$XEMU
- name: PPC
if: ${{ matrix.type == 'PPC' }}
run: make V=1 platformTest CC=$XCC QEMU_SYS=$XEMU
- name: PPC64LE
if: ${{ matrix.type == 'PPC64LE' }}
run: make V=1 platformTest CC=$XCC QEMU_SYS=$XEMU MOREFLAGS=-m64
- name: S390X
if: ${{ matrix.type == 'S390X' }}
run: make V=1 platformTest CC=$XCC QEMU_SYS=$XEMU
# macOS
lz4-platform-macos-latest:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: Environment info
run: |
echo && type cc && which cc && cc --version
echo && type make && which make && make -v
echo && sysctl -a | grep machdep.cpu # cpuinfo
- name: make default
run: CFLAGS="-Werror" make V=1 clean default
- name: make test
run: make clean; make -j V=1 test MOREFLAGS='-Werror -Wconversion -Wno-sign-conversion'
- name: Ensure `make test` doesn't depend on the status of the console
# see issue #990 for detailed explanations
run: make -j test > /dev/null
# Windows
lz4-platform-windows:
name: ${{ matrix.system.os }}
runs-on: ${{ matrix.system.os }}
strategy:
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed.
matrix:
system: [
{ os: windows-2022, build_path: ".\\build\\VS2022" },
]
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: Build ${{ matrix.system.os }}, Win32
run: |
pushd ${{ matrix.system.build_path }}
.\\build-and-test-win32-release.bat
popd
- name: Build ${{ matrix.system.os }}, x64
run: |
pushd ${{ matrix.system.build_path }}
.\\build-and-test-x64-release.bat
popd
###############################################################
# Build systems
#
# - make
# - cmake
# - meson
#
# make
lz4-build-make:
name: make
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: Environment info
run: |
echo && type cc && which cc && cc --version
echo && type make && which make && make -v
- name: make
run: make V=1
lz4-build-make-test-install:
name: make test-install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: test-install
run: make V=1 clean test-install
- name: test-install result
run: |
echo && echo Installed files
( cd ~/install_test_dir; find .; )
# cmake
lz4-build-cmake:
name: cmake
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: Environment info
run: |
echo && type cmake && which cmake && cmake --version
echo && type make && which make && make -v
- name: cmake
run: |
CFLAGS=-Werror cmake -S build/cmake -B build -D CMAKE_INSTALL_PREFIX=install
VERBOSE=1 cmake --build build --target install
cmake -S tests/cmake -B build_test -D CMAKE_INSTALL_PREFIX=install
VERBOSE=1 cmake --build build_test
# Invoke cmake via Makefile
lz4-build-make-cmake:
name: make cmake
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: make cmake
# V=1 for lz4 Makefile, VERBOSE=1 for cmake Makefile.
run: make V=1 VERBOSE=1 clean cmake
# Meson
lz4-build-meson:
name: Meson + Ninja
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # https://github.com/actions/setup-python v4.7.0
with:
python-version: '3.x'
- name: Install
run: |
sudo apt-get update
sudo apt-get install tree ninja-build
python -m pip install --upgrade pip
pip3 install --user meson
- name: Environment info
run: |
echo && type clang && which clang && clang --version
echo && type python && which python && python --version
echo && type meson && which meson && meson --version
- name: setup
# 'run: >' replaces all newlines in the following block with spaces
run: >
meson setup
--fatal-meson-warnings
--buildtype=debug
-Db_lundef=false
-Dauto_features=enabled
-Dprograms=true
-Dcontrib=true
-Dtests=true
-Dexamples=true
build/meson builddir
- name: test
run: |
meson test -C builddir
- name: staging
run: |
cd builddir
DESTDIR=./staging ninja install
tree ./staging
############################################################
# Check git tag for LZ4 releases
#
lz4-check-tag:
name: git version tag checking for release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: make -C tests checkTag
if: startsWith(github.ref, 'refs/tags/v') # If git tag name starts with 'v'
run: |
echo "tag=${GITHUB_REF#refs/*/}"
make -C tests checkTag
tests/checkTag ${GITHUB_REF#refs/*/}
############################################################
# Gather CI environment information.
#
lz4-env-info:
name: GH-Actions Virtual Env Info (${{ matrix.os }})
strategy:
matrix:
include: [
{ os: ubuntu-latest, }, # https://github.com/actions/virtual-environments/
{ os: ubuntu-22.04, }, # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2204-Readme.md
{ os: ubuntu-20.04, }, # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # https://github.com/actions/checkout v4.0.0
- name: init
run: |
sudo apt-get update
- name: cc --version
run: echo && type cc && which cc && cc --version
- name: gcc --version
run: echo && type gcc && which gcc && gcc --version
- name: clang --version
run: echo && type clang && which clang && clang --version
- name: make -v
run: echo && type make && which make && make -v
- name: g++ --version
run: echo && type g++ && which g++ && g++ --version
- name: git --version
run: echo && type git && which git && git --version
- name: gcc packages (apt-cache)
run: apt-cache search gcc | grep "^gcc-[0-9\.]* " | sort
- name: lib32gcc packages for i386 (apt-cache)
run: apt-cache search lib32gcc | grep "^lib32gcc-" | sort
- name: libx32gcc packages for x32 (apt-cache)
run: apt-cache search libx32gcc | grep "^libx32gcc-" | sort
- name: gcc multilib packages (apt-cache)
run: apt-cache search multilib | grep "gcc-" | sort
- name: clang packages (apt-cache)
run: apt-cache search clang | grep "^clang-[0-9\.]* " | sort
- name: QEMU packages (apt-cache)
run: apt-cache search qemu | grep "^qemu-system-.*QEMU full system" | sort
+127
View File
@@ -0,0 +1,127 @@
# Simplified CMake Build Tests
name: CMake Build Tests
on:
push:
branches: ['dev', 'release', '*cmake*']
pull_request:
branches: ['dev', 'release']
permissions:
contents: read
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
# Core functionality test - multi-platform
cmake-core-tests:
name: Core Tests (${{ matrix.os }}, ${{ matrix.build_type }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
build_type: Release
generator: ""
- os: ubuntu-latest
build_type: Debug
generator: ""
- os: windows-latest
build_type: Release
generator: '-G "Visual Studio 17 2022" -A x64'
- os: macos-latest
build_type: Release
generator: ""
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.2
- name: Set up MSVC (Windows)
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v3
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: latest
- name: Configure and Build
shell: bash
run: |
mkdir cmakebuild && cd cmakebuild
cmake ../build/cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build . --config ${{ matrix.build_type }}
- name: Test Installation (Linux only)
if: runner.os == 'Linux'
shell: bash
run: |
cd cmakebuild
cmake --install . --prefix install-test
test -f "install-test/lib/liblz4.a" || test -f "install-test/lib/liblz4.so"
test -f "install-test/include/lz4.h"
# CMake compatibility and integration tests
cmake-extended-tests:
name: Extended Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test_type:
- cmake_versions
- static_lib
- integration
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.2
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: ${{ matrix.test_type == 'cmake_versions' && '3.10.0' || 'latest' }}
- name: CMake Version Compatibility Test
if: matrix.test_type == 'cmake_versions'
run: |
mkdir cmakebuild && cd cmakebuild
cmake ../build/cmake
cmake --build .
- name: Static Library Test
if: matrix.test_type == 'static_lib'
run: |
# Build and install static library
CFLAGS="-Werror -O1" cmake -S build/cmake -B build -DBUILD_STATIC_LIBS=ON -DCMAKE_INSTALL_PREFIX=$PWD/install
cmake --build build --target install
# Test find_package with static library
cmake -S tests/cmake -B build_test -DCMAKE_PREFIX_PATH=$PWD/install
cmake --build build_test
- name: Integration Test
if: matrix.test_type == 'integration'
run: |
# Build and install
cmake -S build/cmake -B build -DCMAKE_INSTALL_PREFIX=$PWD/install
cmake --build build --target install
# Test find_package
cmake -S tests/cmake -B test_build -DCMAKE_PREFIX_PATH=$PWD/install
cmake --build test_build
cd test_build && ctest -V
# Makefile wrapper test
make-cmake-test:
name: Make CMake
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.2
- name: Test via Makefile
run: make clean && make cmakebuild
+105
View File
@@ -0,0 +1,105 @@
# Static analysis and code quality checks
name: Code Quality
on:
push:
pull_request:
permissions:
contents: read
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
cppcheck:
name: Cppcheck Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install cppcheck
run: |
sudo apt-get update
sudo apt-get install cppcheck
- name: Display cppcheck version
run: |
type cppcheck && which cppcheck && cppcheck --version
- name: Run cppcheck analysis
# This test script ignores the exit code of cppcheck.
# See known issues in README.md.
run: make V=1 clean cppcheck || echo "There are some cppcheck reports but we ignore them for now."
scan-build:
name: Clang Static Analyzer
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install clang-tools
run: |
sudo apt-get update
sudo apt-get install clang-tools
- name: Display environment info
run: |
type gcc && which gcc && gcc --version
type clang && which clang && clang --version
type scan-build && which scan-build
type make && which make && make -v
cat /proc/cpuinfo || echo "/proc/cpuinfo is not present"
- name: Run static analysis
run: make V=1 clean staticAnalyze
valgrind:
name: Valgrind Memory Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install valgrind
run: |
sudo apt-get update
sudo apt-get install valgrind
- name: Display environment info
run: |
type cc && which cc && cc --version
type valgrind && which valgrind && valgrind --version
- name: Run memory analysis
run: make V=1 -C tests test-mem
unicode-lint:
name: Unicode Linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Check for unicode issues
run: bash ./tests/unicode_lint.sh
examples:
name: Build Examples
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: sudo apt-get update
- name: Display compiler info
run: |
type cc && which cc && cc --version
type c++ && which c++ && c++ --version
- name: Build examples
run: make V=1 examples
+112
View File
@@ -0,0 +1,112 @@
# Compiler compatibility testing across multiple C compilers
name: Compiler Tests
on:
push:
pull_request:
permissions:
contents: read
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
compiler-matrix:
name: ${{ matrix.cc }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# System default compilers
- { pkgs: '', cc: cc, cxx: c++, x86: true, cxxtest: true, freestanding: true, os: ubuntu-latest }
- { pkgs: '', cc: gcc, cxx: g++, x86: true, cxxtest: true, freestanding: true, os: ubuntu-latest }
# GCC versions - latest stable and LTS
- { pkgs: 'gcc-14 g++-14 lib32gcc-14-dev', cc: gcc-14, cxx: g++-14, x86: true, cxxtest: true, freestanding: true, os: ubuntu-24.04 }
- { pkgs: 'gcc-11 g++-11 lib32gcc-11-dev', cc: gcc-11, cxx: g++-11, x86: true, cxxtest: true, freestanding: true, os: ubuntu-22.04 }
# Clang versions - system default, latest stable, and older stable
- { pkgs: 'lib32gcc-12-dev', cc: clang, cxx: clang++, x86: true, cxxtest: true, freestanding: false, os: ubuntu-latest }
- { pkgs: 'clang-18 lib32gcc-12-dev', cc: clang-18, cxx: clang++-18, x86: true, cxxtest: true, freestanding: false, os: ubuntu-24.04 }
- { pkgs: 'clang-14 lib32gcc-12-dev', cc: clang-14, cxx: clang++-14, x86: true, cxxtest: true, freestanding: false, os: ubuntu-22.04 }
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
FIXME__LZ4_CI_IGNORE: ' echo Error. But we ignore it for now.'
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
if [ "${{ matrix.pkgs }}" != "" ]; then
sudo apt-get install ${{ matrix.pkgs }}
fi
- name: Display environment info
run: |
echo "=== Compiler Information ==="
type $CC && which $CC && $CC --version
echo "=== C++ Compiler Information ==="
type $CXX && which $CXX && $CXX --version
- name: Basic build test
run: make -j V=1
- name: Installation test
run: make -C tests test-install V=1
- name: Build all with strict flags
run: |
make clean
CFLAGS="-Werror -O0" make -j all V=1
- name: C90 standard compliance test
run: |
make clean
make -j c_standards_c90 V=1
- name: C11 standard compliance test
run: |
make clean
make -j c_standards_c11 V=1
- name: C library for C++ program test
if: ${{ matrix.cxxtest }}
run: |
make clean
make -j ctocxxtest V=1
- name: C++ compilation test
if: ${{ matrix.cxxtest }}
run: |
make clean
make -j cxxtest V=1
- name: Freestanding environment test
if: ${{ matrix.freestanding }}
run: |
make clean
make test-freestanding V=1
- name: Fortified build test
run: |
make clean
CFLAGS='-fPIC' LDFLAGS='-pie -fPIE -D_FORTIFY_SOURCE=2' make -j -C programs default V=1
- name: Core functionality test
run: |
make clean
CPPFLAGS=-DLZ4IO_NO_TSAN_ONLY make -j V=1 -C tests test-lz4
- name: 32-bit compatibility test
if: ${{ matrix.x86 }}
run: |
make clean
CFLAGS='-Werror -O1' make -j -C tests test-lz4c32 V=1
+163
View File
@@ -0,0 +1,163 @@
# Core LZ4 functionality testing
name: Core Tests
on:
push:
pull_request:
permissions:
contents: read
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
benchmark:
name: Benchmark Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: Basic compression test
run: make -j -C tests test-lz4c V=1
- name: Full benchmark test
run: make -j -C tests test-fullbench V=1
- name: 32-bit benchmark test
run: make -j -C tests test-fullbench32 V=1
fuzzer:
name: Fuzzer Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: Setup memory mapping
run: sudo sysctl -w vm.mmap_min_addr=4096
- name: Fuzzer test (64-bit)
run: make -j -C tests test-fuzzer V=1
- name: Fuzzer test (32-bit)
run: make -C tests test-fuzzer32 V=1
versions:
name: Version Compatibility Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: Version compatibility test
run: make -j -C tests versionsTest V=1
abi:
name: ABI Compatibility Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: ABI compatibility test
run: make -j -C tests abiTests V=1
frame:
name: LZ4 Frame Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
- name: Frame format test (64-bit)
run: make -j -C tests test-frametest V=1
- name: Frame format test (32-bit)
run: make -j -C tests test-frametest32 V=1
memory-usage:
name: Memory Usage Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Test different LZ4_MEMORY_USAGE values
run: make V=1 -C tests test-compile-with-lz4-memory-usage
custom-distance:
name: Custom Configuration Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Custom LZ4_DISTANCE_MAX test
run: |
CPPFLAGS='-DLZ4_DISTANCE_MAX=8000' make V=1 check
make clean
- name: Dynamic library linking test
run: |
make -C programs lz4-wlib V=1
make clean
- name: User memory functions test
run: |
make -C tests fullbench-wmalloc V=1
make clean
CC="c++ -Wno-deprecated" make -C tests fullbench-wmalloc V=1
makefile-variables:
name: Makefile Standard Variables Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Test standard variable propagation
run: make test_stdvars V=1
block-device:
name: Block Device Compression Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Test block device compression
run: |
make lz4
dd if=/dev/zero of=full0.img bs=2M count=1
BLOCK_DEVICE=$(sudo losetup --show -fP full0.img)
sudo chmod 666 $BLOCK_DEVICE
./lz4 -v $BLOCK_DEVICE -c > /dev/null
sudo losetup -d $BLOCK_DEVICE
rm full0.img
+93
View File
@@ -0,0 +1,93 @@
# Cross-platform testing using QEMU emulation
name: Cross Platform
on:
push:
pull_request:
permissions:
contents: read
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
qemu-platforms:
name: ${{ matrix.arch }} (QEMU)
strategy:
fail-fast: false
matrix:
include:
- { arch: ARM, pkgs: 'qemu-system-arm gcc-arm-linux-gnueabi', xcc: arm-linux-gnueabi-gcc, xemu: qemu-arm-static, makevar: "" }
- { arch: ARM64, pkgs: 'qemu-system-arm gcc-aarch64-linux-gnu', xcc: aarch64-linux-gnu-gcc, xemu: qemu-aarch64-static, makevar: "" }
- { arch: PPC, pkgs: 'qemu-system-ppc gcc-powerpc-linux-gnu', xcc: powerpc-linux-gnu-gcc, xemu: qemu-ppc-static, makevar: "" }
- { arch: PPC64LE, pkgs: 'qemu-system-ppc gcc-powerpc64le-linux-gnu', xcc: powerpc64le-linux-gnu-gcc, xemu: qemu-ppc64le-static, makevar: "" }
- { arch: S390X, pkgs: 'qemu-system-s390x gcc-s390x-linux-gnu', xcc: s390x-linux-gnu-gcc, xemu: qemu-s390x-static, makevar: "" }
- { arch: MIPS, pkgs: 'qemu-system-mips gcc-mips-linux-gnu', xcc: mips-linux-gnu-gcc, xemu: qemu-mips-static, makevar: "" }
- { arch: M68K, pkgs: 'qemu-system-m68k gcc-m68k-linux-gnu', xcc: m68k-linux-gnu-gcc, xemu: qemu-m68k-static, makevar: "HAVE_MULTITHREAD=0" }
- { arch: RISC-V, pkgs: 'qemu-system-riscv64 gcc-riscv64-linux-gnu', xcc: riscv64-linux-gnu-gcc, xemu: qemu-riscv64-static, makevar: "" }
- { arch: SPARC, pkgs: 'qemu-system-sparc gcc-sparc64-linux-gnu', xcc: sparc64-linux-gnu-gcc, xemu: qemu-sparc64-static, makevar: "" }
runs-on: ubuntu-latest
env:
XCC: ${{ matrix.xcc }}
XEMU: ${{ matrix.xemu }}
MAKEVAR: ${{ matrix.makevar }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install cross-compilation tools
run: |
sudo apt-get update
sudo apt-get install gcc-multilib qemu-utils qemu-user-static
sudo apt-get install ${{ matrix.pkgs }}
- name: Display environment info
run: |
echo "=== Cross Compiler Information ==="
type $XCC && which $XCC && $XCC --version
$XCC -v # Show built-in specs
echo "=== QEMU Emulator Information ==="
type $XEMU && which $XEMU && $XEMU --version
- name: Run platform tests (ARM/ARM64/PPC/S390X)
if: contains(fromJSON('["ARM", "ARM64", "PPC", "S390X"]'), matrix.arch)
run: make platformTest V=1 CC=$XCC QEMU_SYS=$XEMU
- name: Run platform tests (PPC64LE)
if: matrix.arch == 'PPC64LE'
run: CFLAGS=-m64 make platformTest V=1 CC=$XCC QEMU_SYS=$XEMU
- name: Run platform tests (MIPS/M68K/RISC-V/SPARC)
if: contains(fromJSON('["MIPS", "M68K", "RISC-V", "SPARC"]'), matrix.arch)
run: make platformTest V=1 CC=$XCC QEMU_SYS=$XEMU $MAKEVAR
macos:
name: macOS
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Display environment info
run: |
type cc && which cc && cc --version
type make && which make && make -v
sysctl -a | grep machdep.cpu # CPU info
- name: Build with strict flags
run: |
make clean
CFLAGS="-Werror -O0" make default V=1
- name: Run comprehensive tests
run: |
make clean
CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" make -j test V=1
- name: Test console independence
# Ensure `make test` doesn't depend on the status of the console
# See issue #990 for detailed explanations
run: make -j test > /dev/null
+45
View File
@@ -0,0 +1,45 @@
# OSS-Fuzz integration testing
name: OSS-Fuzz
on:
push:
pull_request:
permissions:
contents: read
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
oss-fuzz:
name: OSS-Fuzz (${{ matrix.sanitizer }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sanitizer: [address, undefined, memory]
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'lz4'
dry-run: false
sanitizer: ${{ matrix.sanitizer }}
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'lz4'
fuzz-seconds: 100
dry-run: false
sanitizer: ${{ matrix.sanitizer }}
- name: Upload Crash Artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure() && steps.build.outcome == 'success'
with:
name: ${{ matrix.sanitizer }}-artifacts
path: ./out/artifacts
+69
View File
@@ -0,0 +1,69 @@
# Release and environment testing
name: Release & Environment
on:
push:
pull_request:
permissions:
contents: read
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
check-git-tag:
name: Git Version Tag Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Validate release tag
if: startsWith(github.ref, 'refs/tags/v')
run: |
echo "tag=${GITHUB_REF#refs/*/}"
make -C tests checkTag
tests/checkTag ${GITHUB_REF#refs/*/}
environment-info:
name: Environment Info (${{ matrix.os }})
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Update package list
run: sudo apt-get update
- name: Display compiler versions
run: |
echo "=== Default C Compiler ==="
type cc && which cc && cc --version
echo "=== GCC ==="
type gcc && which gcc && gcc --version
echo "=== Clang ==="
type clang && which clang && clang --version
echo "=== Make ==="
type make && which make && make -v
echo "=== G++ ==="
type g++ && which g++ && g++ --version
echo "=== Git ==="
type git && which git && git --version
- name: List available package versions
run: |
echo "=== Available GCC Packages ==="
apt-cache search gcc | grep "^gcc-[0-9\.]* " | sort
echo "=== Available lib32gcc Packages (i386) ==="
apt-cache search lib32gcc | grep "^lib32gcc-" | sort
echo "=== Available GCC Multilib Packages ==="
apt-cache search multilib | grep "gcc-" | sort
echo "=== Available Clang Packages ==="
apt-cache search clang | grep "^clang-[0-9\.]* " | sort
echo "=== Available QEMU Packages ==="
apt-cache search qemu | grep "^qemu-system-.*QEMU full system" | sort
+99
View File
@@ -0,0 +1,99 @@
# Sanitizer testing (AddressSanitizer, MemorySanitizer, etc.)
name: Sanitizers
on:
push:
pull_request:
permissions:
contents: read
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
ubsan-x64:
name: UndefinedBehaviorSanitizer (x64)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run UBSan tests
run: make ubsan V=1
ubsan-x86:
name: UndefinedBehaviorSanitizer (x86)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install 32-bit dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-multilib lib32gcc-11-dev
- name: Run UBSan tests (32-bit)
run: |
make clean
CC=clang make V=1 usan32
asan-x64:
name: AddressSanitizer (x64)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup memory mapping
run: sudo sysctl -w vm.mmap_min_addr=4096
- name: ASan - basic check
run: |
make clean
CFLAGS=-fsanitize=address LDFLAGS=-fsanitize=address make -j check V=1
- name: ASan - frame test
run: |
make clean
CFLAGS=-fsanitize=address LDFLAGS=-fsanitize=address make -j -C tests test-frametest V=1
- name: ASan - fuzzer test
run: |
make clean
CFLAGS=-fsanitize=address LDFLAGS=-fsanitize=address make -j -C tests test-fuzzer V=1
msan-x64:
name: MemorySanitizer (x64)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: MSan - basic check
run: |
make clean
CC=clang CFLAGS=-fsanitize=memory LDFLAGS=-fsanitize=memory make -j check V=1
- name: MSan - frame test
run: |
make clean
CC=clang CFLAGS=-fsanitize=memory LDFLAGS=-fsanitize=memory make -j -C tests test-frametest V=1
- name: MSan - fuzzer test
run: |
make clean
CC=clang CFLAGS=-fsanitize=memory LDFLAGS=-fsanitize=memory make -j -C tests test-fuzzer V=1
tsan-x64:
name: ThreadSanitizer (x64)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: TSan - CLI test
run: |
make clean
CC=clang CPPFLAGS="-fsanitize=thread" make -j -C tests test-lz4 V=1
+65
View File
@@ -0,0 +1,65 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.
name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '23 22 * * 3'
push:
branches: [ "dev" ]
# Declare default permissions as read only.
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
steps:
- name: "Checkout code"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# you want to enable the Branch-Protection check on a *public* repository
# To create the PAT, follow the steps in
# https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
with:
sarif_file: results.sarif
+16
View File
@@ -1,6 +1,8 @@
# Object files
*.o
*.ko
obj/
cacheObjs/
# Libraries
*.lib
@@ -19,14 +21,23 @@
*.app
lz4
# Builders
cmakebuild/
builddir/
cachedObjs/
# IDE / editors files
.clang_complete
.vscode
_codelite/
_codelite_lz4/
bin/
*.zip
*.swp
compile_flags.txt
compile_commands.json
.vscode
.cache
# analyzers
infer-out
@@ -42,6 +53,11 @@ ld.exe*
# test artifacts
*.lz4
tmp*
.stdvars.log
cmake_download/
cmake_bins/
cmake_build/
cmake_install_test/
# generated Windows resource files
lib/*.rc
+57
View File
@@ -0,0 +1,57 @@
LZ4 CODING STYLE
================
When contributing code and patches to the `LZ4` project, the following rules are expected to be followed for a successful merge.
Library
-------
The library's source code in `lib/` directory has a BSD 2-clause license.
It's designed to be integrated into 3rd party applications.
It adheres relatively strictly to vanilla `C90`, with the following exceptions:
- `long long` type is required, in order to support 64-bit values
- Variadic Macros are used for debug mode (but not required in release mode)
Beyond that, all other rules and limitations of C90 must be respected, including `/* ... */` comment style only, and variable declaration at top of block only. The automated CI test suite will check for these rules.
The code is allowed to use more modern variants (C99 / C11 / C23) when useful
as long as it provides a clean C90 backup for older compilers.
For example, C99+ compilers will employ the `restrict` keyword, while `C90` ones will ignore it, thanks to conditional macros.
This ensures maximum portability across a wide range of systems.
Moreover, in the interest of safety, the code has to respect a fairly strigent list of additional restrictions, provided through warning flags, the list of which is maintained within `Makefile`.
Among the less common ones, we want the source to be compatible with `-Wc++-compat`, which ensures that the code can be compiled "as is", with no modification, as C++ code. It makes it possible to copy-paste the code into other C++ source files, or the source files are just dropped into a C++ environment which then compiles them as C++ source files.
Command Line Interface
----------------------
The CLI executable's source code in `programs/` directory has a GPLv2+ license.
While it's designed to be portable and freely distributable, it's not meant to be integrated into 3rd party applications.
The license difference is meant to reflect that choice.
Similar to the library, the CLI adheres relatively strictly to vanilla `C90`, and features the same exceptions:
- `long long` requirement for 64-bit values
- Variadic Macros for console messages (now used all the time, not just debug mode)
The code can also use system-specific libraries and symbols (such as `posix` ones)
as long as it provides a backup for plain `C90` platforms.
It's even allowed to lose capabilities, as long as the CLI can be cleanly compiled on `C90`.
For example, systems without `<pthread>` support nor Completion Ports will just not feature multi-threading support, and run single threaded.
In the interest of build familiarity, the CLI source code also respects the same set of advanced warning flags as the library.
That being said, this last part is debatable and could deviate in the future.
For example, there are less reasons to support `-Wc++-compat` on the CLI side, since it's not meant to be integrated into 3rd party applications.
Others
------
The repository includes other directories with their own set of compilable projects, such as `tests/`, `examples/` and `contrib/`.
These repositories do not have to respect the same set of restrictions, and can employ a larger array of different languages.
For example, some tests employ `sh`, and others employ `python`.
These directories may nonetheless include several targets employing the same coding convention as the `lz4` library. This is in a no way a rule, more like a side effect of build familiarity.
+1 -1
View File
@@ -1,6 +1,6 @@
This repository uses 2 different licenses :
- all files in the `lib` directory use a BSD 2-Clause license
- all other files use a GPLv2 license, unless explicitly stated otherwise
- all other files use a GPL-2.0-or-later license, unless explicitly stated otherwise
Relevant license is reminded at the top of each source file,
and with presence of COPYING or LICENSE file in associated directories.
+62 -84
View File
@@ -1,6 +1,6 @@
# ################################################################
# LZ4 - Makefile
# Copyright (C) Yann Collet 2011-2020
# Copyright (C) Yann Collet 2011-2023
# All rights reserved.
#
# BSD license
@@ -36,8 +36,9 @@ TESTDIR = tests
EXDIR = examples
FUZZDIR = ossfuzz
include Makefile.inc
include build/make/lz4defs.make
MAKE += --no-print-directory
.PHONY: default
default: lib-release lz4-release
@@ -52,19 +53,17 @@ all: allmost examples manuals build_tests
allmost: lib lz4
.PHONY: lib lib-release liblz4.a
lib: liblz4.a
lib lib-release liblz4.a:
$(MAKE) -C $(LZ4DIR) $@
.PHONY: lz4 lz4-release
lz4 : liblz4.a
lz4-release : lib-release
lz4 lz4-release :
$(MAKE) -C $(PRGDIR) $@
cp $(PRGDIR)/lz4$(EXT) .
$(LN_SF) $(PRGDIR)/lz4$(EXT) .
echo lz4 build completed
.PHONY: examples
examples: liblz4.a
examples: lib
$(MAKE) -C $(EXDIR) all
.PHONY: manuals
@@ -76,6 +75,7 @@ build_tests:
$(MAKE) -C $(TESTDIR) all
.PHONY: clean
clean: MAKEFLAGS= --no-print-directory
clean:
$(MAKE) -C $(LZ4DIR) $@ > $(VOID)
$(MAKE) -C $(PRGDIR) $@ > $(VOID)
@@ -84,7 +84,7 @@ clean:
$(MAKE) -C $(FUZZDIR) $@ > $(VOID)
$(MAKE) -C contrib/gen_manual $@ > $(VOID)
$(RM) lz4$(EXT)
$(RM) -r $(CMAKE_BUILD_DIR)
$(RM) -r $(CMAKE_BUILD_DIR) $(MESON_BUILD_DIR)
@echo Cleaning completed
@@ -113,11 +113,18 @@ HOST_OS = MSYS
CMAKE_PARAMS = -G"MSYS Makefiles"
endif
.PHONY: cmake
cmake:
.PHONY: cmakebuild
cmakebuild:
mkdir -p $(CMAKE_BUILD_DIR)
cd $(CMAKE_BUILD_DIR); $(CMAKE) $(CMAKE_PARAMS) ..; $(CMAKE) --build .
MESON ?= meson
MESON_BUILD_DIR ?= mesonBuildDir
.PHONY: mesonbuild
mesonbuild:
$(MESON) setup --fatal-meson-warnings --buildtype=debug -Db_lundef=false -Dauto_features=enabled -Dprograms=true -Dcontrib=true -Dtests=true -Dexamples=true build/meson $(MESON_BUILD_DIR)
$(MESON) test -C $(MESON_BUILD_DIR)
#------------------------------------------------------------------------
# make tests validated only for MSYS and Posix environments
@@ -137,23 +144,6 @@ test:
$(MAKE) -C $(TESTDIR) $@
$(MAKE) -C $(EXDIR) $@
.PHONY: clangtest
clangtest: CFLAGS += -Werror -Wconversion -Wno-sign-conversion
clangtest: CC = clang
clangtest: clean
$(CC) -v
$(MAKE) -C $(LZ4DIR) all CC=$(CC)
$(MAKE) -C $(PRGDIR) all CC=$(CC)
$(MAKE) -C $(TESTDIR) all CC=$(CC)
.PHONY: clangtest-native
clangtest-native: CFLAGS = -O3 -Werror -Wconversion -Wno-sign-conversion
clangtest-native: clean
clang -v
$(MAKE) -C $(LZ4DIR) all CC=clang
$(MAKE) -C $(PRGDIR) native CC=clang
$(MAKE) -C $(TESTDIR) native CC=clang
.PHONY: usan
usan: CC = clang
usan: CFLAGS = -O3 -g -fsanitize=undefined -fno-sanitize-recover=undefined -fsanitize-recover=pointer-overflow
@@ -161,6 +151,9 @@ usan: LDFLAGS = $(CFLAGS)
usan: clean
CC=$(CC) CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' $(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1
.PHONY: ubsan
ubsan: usan
.PHONY: usan32
usan32: CFLAGS = -m32 -O3 -g -fsanitize=undefined -fno-sanitize-recover=undefined -fsanitize-recover=pointer-overflow
usan32: LDFLAGS = $(CFLAGS)
@@ -181,59 +174,62 @@ cppcheck:
platformTest: clean
@echo "\n ---- test lz4 with $(CC) compiler ----"
$(CC) -v
CFLAGS="-O3 -Werror" $(MAKE) -C $(LZ4DIR) all
CFLAGS="-O3 -Werror -static" $(MAKE) -C $(PRGDIR) all
CFLAGS="-O3 -Werror -static" $(MAKE) -C $(TESTDIR) all
CFLAGS="$(CFLAGS) -O3 -Werror" $(MAKE) -C $(LZ4DIR) all
CFLAGS="$(CFLAGS) -O3 -Werror -static" $(MAKE) -C $(PRGDIR) all
CFLAGS="$(CFLAGS) -O3 -Werror -static" $(MAKE) -C $(TESTDIR) all
$(MAKE) -C $(TESTDIR) test-platform
.PHONY: versionsTest
versionsTest: clean
versionsTest:
$(MAKE) -C $(TESTDIR) clean
$(MAKE) -C $(TESTDIR) $@
.PHONY: test-freestanding
test-freestanding:
$(MAKE) -C $(TESTDIR) clean $@
$(MAKE) -C $(TESTDIR) clean
$(MAKE) -C $(TESTDIR) $@
# test linking C libraries from C++ executables
.PHONY: ctocxxtest
ctocxxtest: LIBCC="$(CC)"
ctocxxtest: EXECC="$(CXX) -Wno-deprecated"
ctocxxtest: CFLAGS=-O0
ctocxxtest:
CFLAGS="$(CFLAGS)" CC=$(LIBCC) $(MAKE) -C $(LZ4DIR) all
CC=$(LIBCC) $(MAKE) -C $(TESTDIR) CFLAGS="$(CFLAGS)" lz4.o lz4hc.o lz4frame.o
CC=$(EXECC) $(MAKE) -C $(TESTDIR) CFLAGS="$(CFLAGS)" all
.PHONY: cxxtest cxx32test
cxx32test: CFLAGS += -m32
cxxtest cxx32test: CC := "$(CXX) -Wno-deprecated"
cxxtest cxx32test: CFLAGS = -O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror
cxx32test: CFLAGS += -m32
cxxtest cxx32test: clean
cxxtest cxx32test:
$(CXX) -v
CC=$(CC) $(MAKE) -C $(LZ4DIR) all CFLAGS="$(CFLAGS)"
CC=$(CC) $(MAKE) -C $(PRGDIR) all CFLAGS="$(CFLAGS)"
CC=$(CC) $(MAKE) -C $(TESTDIR) all CFLAGS="$(CFLAGS)"
CC=$(CC) CFLAGS="$(CFLAGS)" $(MAKE) -C $(LZ4DIR) all
CC=$(CC) CFLAGS="$(CFLAGS)" $(MAKE) -C $(PRGDIR) all
CC=$(CC) CFLAGS="$(CFLAGS)" $(MAKE) -C $(TESTDIR) all
.PHONY: cxx17build
cxx17build : CC = "$(CXX) -Wno-deprecated"
cxx17build : CFLAGS = -std=c++17 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror -pedantic
cxx17build : CFLAGS = -std=c++17 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror -Wpedantic
cxx17build : clean
$(CXX) -v
CC=$(CC) $(MAKE) -C $(LZ4DIR) all CFLAGS="$(CFLAGS)"
CC=$(CC) $(MAKE) -C $(PRGDIR) all CFLAGS="$(CFLAGS)"
CC=$(CC) $(MAKE) -C $(TESTDIR) all CFLAGS="$(CFLAGS)"
.PHONY: ctocpptest
ctocpptest: LIBCC="$(CC)"
ctocpptest: TESTCC="$(CXX)"
ctocpptest: CFLAGS=
ctocpptest: clean
CC=$(LIBCC) $(MAKE) -C $(LZ4DIR) CFLAGS="$(CFLAGS)" all
CC=$(LIBCC) $(MAKE) -C $(TESTDIR) CFLAGS="$(CFLAGS)" lz4.o lz4hc.o lz4frame.o
CC=$(TESTCC) $(MAKE) -C $(TESTDIR) CFLAGS="$(CFLAGS)" all
.PHONY: c_standards
c_standards: clean c_standards_c11 c_standards_c99 c_standards_c90
.PHONY: c_standards_c90
c_standards_c90: clean
$(MAKE) clean; CFLAGS="-std=c90 -Werror -pedantic -Wno-long-long -Wno-variadic-macros" $(MAKE) allmost
$(MAKE) clean; CFLAGS="-std=gnu90 -Werror -pedantic -Wno-long-long -Wno-variadic-macros" $(MAKE) allmost
$(MAKE) clean; CFLAGS="-std=c90 -Werror -Wpedantic -Wno-long-long -Wno-variadic-macros" $(MAKE) allmost
$(MAKE) clean; CFLAGS="-std=gnu90 -Werror -Wpedantic -Wno-long-long -Wno-variadic-macros" $(MAKE) allmost
.PHONY: c_standards_c99
c_standards_c99: clean
$(MAKE) clean; CFLAGS="-std=c99 -Werror -pedantic" $(MAKE) all
$(MAKE) clean; CFLAGS="-std=gnu99 -Werror -pedantic" $(MAKE) all
$(MAKE) clean; CFLAGS="-std=c99 -Werror -Wpedantic" $(MAKE) all
$(MAKE) clean; CFLAGS="-std=gnu99 -Werror -Wpedantic" $(MAKE) all
.PHONY: c_standards_c11
c_standards_c11: clean
@@ -242,38 +238,20 @@ c_standards_c11: clean
# The following test ensures that standard Makefile variables set through environment
# are correctly transmitted at compilation stage.
# This test is meant to detect issues like https://github.com/lz4/lz4/issues/958
.PHONY: standard_variables
standard_variables: clean
@echo =================
@echo Check support of Makefile Standard variables through environment
@echo note : this test requires V=1 to work properly
@echo =================
CC="cc -DCC_TEST" \
CFLAGS=-DCFLAGS_TEST \
CPPFLAGS=-DCPPFLAGS_TEST \
LDFLAGS=-DLDFLAGS_TEST \
LDLIBS=-DLDLIBS_TEST \
$(MAKE) V=1 > tmpsv
# Note: just checking the presence of custom flags
# would not detect situations where custom flags are
# supported in some part of the Makefile, and missed in others.
# So the test checks if they are present the _right nb of times_.
# However, checking static quantities makes this test brittle,
# because quantities (7, 2 and 1) can still evolve in future,
# for example when source directories or Makefile evolve.
if [ $$(grep CC_TEST tmpsv | wc -l) -ne 7 ]; then \
echo "CC environment variable missed" && False; fi
if [ $$(grep CFLAGS_TEST tmpsv | wc -l) -ne 7 ]; then \
echo "CFLAGS environment variable missed" && False; fi
if [ $$(grep CPPFLAGS_TEST tmpsv | wc -l) -ne 7 ]; then \
echo "CPPFLAGS environment variable missed" && False; fi
if [ $$(grep LDFLAGS_TEST tmpsv | wc -l) -ne 2 ]; then \
echo "LDFLAGS environment variable missed" && False; fi
if [ $$(grep LDLIBS_TEST tmpsv | wc -l) -ne 1 ]; then \
echo "LDLIBS environment variable missed" && False; fi
@echo =================
@echo all custom variables detected
@echo =================
$(RM) tmpsv
.PHONY: test_stdvars
test_stdvars: ## CI helper – verifies CC/CFLAGS/CPPFLAGS/LDFLAGS/LDLIBS propagation
@echo '--- standard-variable propagation test ---'
@$(RM) .stdvars.log
@$(MAKE) -rn V=1 \
CC='cc -DCC_TEST' \
CFLAGS='-DCFLAGS_TEST' \
CPPFLAGS='-DCPPFLAGS_TEST' \
LDFLAGS='-DLDFLAGS_TEST' \
LDLIBS='-DLDLIBS_TEST' \
| tee .stdvars.log >/dev/null
@tests/check_stdvars.sh .stdvars.log
@$(RM) .stdvars.log
endif # MSYS POSIX
+24
View File
@@ -1,3 +1,27 @@
v1.10.0
cli : multithreading compression support: improves speed by X times threads allocated
cli : overlap decompression with i/o, improving speed by ~+60%
cli : support environment variables LZ4_CLEVEL and LZ4_NBWORKERS
cli : license of CLI more clearly labelled GPL-2.0-or-later
cli : fix: refuse to compress directories
cli : fix dictionary compression benchmark on multiple files
cli : change: no more implicit `stdout` (except when input is `stdin`)
lib : new level 2, offering mid-way performance (speed and compression)
lib : Improved lz4frame compression speed for small data (up to +160% at 1KB)
lib : Slightly faster (+5%) HC compression speed (levels 3-9), by @JunHe77
lib : dictionary compression support now in stable status
lib : lz4frame states can be safely reset and reused after a processing error (described by @QrczakMK)
lib : `lz4file` API improvements, by @vsolontsov-volant and @t-mat
lib : new experimental symbol `LZ4_compress_destSize_extState()`
build: cmake minimum version raised to 3.5
build: cmake improvements, by @foxeng, @Ohjurot, @LocalSpook, @teo-tsirpanis, @ur4t and @t-mat
build: meson scripts are now hosted into `build/` directory, by @eli-schwartz
build: meson improvements, by @tristan957
build: Visual Studio solutions generated by `cmake` via scripts
port : support for loongArch, risc-v, m68k, mips and sparc architectures
port : improved Visual Studio compatibility, by @t-mat
port : freestanding support improvements, by @t-mat
v1.9.4
perf : faster decoding speed (~+20%) on aarch64 platforms
perf : faster decoding speed (~+70%) for -BD4 setting in CLI
+2 -14
View File
@@ -20,18 +20,9 @@ It can ingest any input file as dictionary, though only the final 64KB are used.
This capability can be combined with the [Zstandard Dictionary Builder](https://github.com/facebook/zstd/blob/v1.3.5/programs/zstd.1.md#dictionary-builder),
in order to drastically improve compression performance on small files.
LZ4 library is provided as open-source software using BSD 2-Clause license.
|Branch |Status |
|------------|---------|
|dev | [![Build status][AppveyorDevBadge]][AppveyorLink] |
[AppveyorDevBadge]: https://ci.appveyor.com/api/projects/status/github/lz4/lz4?branch=dev&svg=true "Windows test suite"
[AppveyorLink]: https://ci.appveyor.com/project/YannCollet/lz4-1lndh
Benchmarks
-------------------------
@@ -44,7 +35,7 @@ in single-thread mode.
[lzbench]: https://github.com/inikep/lzbench
[Silesia Corpus]: http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia
| Compressor | Ratio | Compression | Decompression |
| Compressor | Factor | Compression | Decompression |
| ---------- | ----- | ----------- | ------------- |
| memcpy | 1.000 | 13700 MB/s | 13700 MB/s |
|**LZ4 default (v1.9.0)** |**2.101**| **780 MB/s**| **4970 MB/s** |
@@ -60,9 +51,6 @@ in single-thread mode.
[zlib]: http://www.zlib.net/
[Zstandard]: http://www.zstd.net/
LZ4 is also compatible and optimized for x32 mode,
for which it provides additional speed performance.
Installation
-------------------------
@@ -123,7 +111,7 @@ Most distributions are bundled with a package manager
which allows easy installation of both the `liblz4` library
and the `lz4` command line interface.
[![Packaging status](https://repology.org/badge/vertical-allrepos/lz4.svg)](https://repology.org/project/lz4/versions)
[![Packaging status](https://repology.org/badge/vertical-allrepos/lz4.svg?columns=4&exclude_unsupported=1)](https://repology.org/project/lz4/versions)
### Special Thanks
+71 -131
View File
@@ -1,147 +1,87 @@
version: 1.0.{build}
# Test matrix: MinGW compilers only (Visual Studio testing moved to GitHub Actions)
environment:
matrix:
- COMPILER: "gcc"
PLATFORM: "mingw64"
- COMPILER: "gcc"
PLATFORM: "mingw32"
- COMPILER: "visual"
CONFIGURATION: "Debug"
PLATFORM: "x64"
- COMPILER: "visual"
CONFIGURATION: "Debug"
PLATFORM: "Win32"
- COMPILER: "visual"
CONFIGURATION: "Release"
PLATFORM: "x64"
- COMPILER: "visual"
CONFIGURATION: "Release"
PLATFORM: "Win32"
- COMPILER: "gcc"
PLATFORM: "clang"
- COMPILER: gcc
PLATFORM: mingw32
- COMPILER: gcc
PLATFORM: mingw64
- COMPILER: clang
PLATFORM: mingw64
install:
- ECHO Installing %COMPILER% %PLATFORM% %CONFIGURATION%
- MKDIR bin
- if [%COMPILER%]==[gcc] SET PATH_ORIGINAL=%PATH%
- if [%COMPILER%]==[gcc] (
SET "PATH_MINGW32=c:\MinGW\bin;c:\MinGW\usr\bin" &&
SET "PATH_MINGW64=c:\msys64\mingw64\bin;c:\msys64\usr\bin" &&
COPY C:\MinGW\bin\mingw32-make.exe C:\MinGW\bin\make.exe &&
COPY C:\MinGW\bin\gcc.exe C:\MinGW\bin\cc.exe
) else (
IF [%PLATFORM%]==[x64] (SET ADDITIONALPARAM=/p:LibraryPath="C:\Program Files\Microsoft SDKs\Windows\v7.1\lib\x64;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\;C:\Program Files (x86)\Microsoft Visual Studio 10.0\lib\amd64;")
)
- echo Installing %COMPILER% %PLATFORM%
- mkdir bin
# Setup MinGW environment
- set "PATH_MINGW32=c:\MinGW\bin;c:\MinGW\usr\bin"
- set "PATH_MINGW64=c:\msys64\mingw64\bin;c:\msys64\usr\bin"
- copy C:\MinGW\bin\mingw32-make.exe C:\MinGW\bin\make.exe >nul 2>&1
- copy C:\MinGW\bin\gcc.exe C:\MinGW\bin\cc.exe >nul 2>&1
build_script:
- if [%PLATFORM%]==[mingw32] SET PATH=%PATH_MINGW32%;%PATH_ORIGINAL%
- if [%PLATFORM%]==[mingw64] SET PATH=%PATH_MINGW64%;%PATH_ORIGINAL%
- if [%PLATFORM%]==[clang] SET PATH=%PATH_MINGW64%;%PATH_ORIGINAL%
- ECHO *** &&
ECHO Building %COMPILER% %PLATFORM% %CONFIGURATION% &&
ECHO ***
- if [%PLATFORM%]==[clang] (clang -v)
- if [%COMPILER%]==[gcc] (gcc -v)
- echo "*** Building %COMPILER% %PLATFORM% ***"
# Configure PATH for MinGW builds
- if [%PLATFORM%]==[mingw32] set PATH=%PATH_MINGW32%;%PATH%
- if [%PLATFORM%]==[mingw64] set PATH=%PATH_MINGW64%;%PATH%
# GCC Build
- if [%COMPILER%]==[gcc] (
echo ----- &&
echo "GCC build started" &&
gcc -v &&
make -v &&
echo ----- &&
if not [%PLATFORM%]==[clang] (
make -C programs lz4 &&
make -C tests fullbench &&
make -C tests fuzzer &&
make -C lib lib V=1
) ELSE (
make -C programs lz4 CC=clang MOREFLAGS="--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion" &&
make -C tests fullbench CC=clang MOREFLAGS="--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion" &&
make -C tests fuzzer CC=clang MOREFLAGS="--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion" &&
make -C lib lib CC=clang MOREFLAGS="--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion"
)
)
- if [%COMPILER%]==[gcc] if not [%PLATFORM%]==[clang] (
MKDIR bin\dll bin\static bin\example bin\include &&
COPY tests\fullbench.c bin\example\ &&
COPY lib\xxhash.c bin\example\ &&
COPY lib\xxhash.h bin\example\ &&
COPY lib\lz4.h bin\include\ &&
COPY lib\lz4hc.h bin\include\ &&
COPY lib\lz4frame.h bin\include\ &&
COPY lib\liblz4.a bin\static\liblz4_static.lib &&
COPY lib\liblz4.dll* bin\dll\ &&
COPY lib\dll\example\Makefile bin\example\ &&
COPY lib\dll\example\fullbench-dll.* bin\example\ &&
COPY lib\dll\example\README.md bin\ &&
COPY programs\lz4.exe bin\lz4.exe
)
- if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw64] (
7z.exe a -bb1 bin\lz4_x64.zip NEWS .\bin\lz4.exe .\bin\README.md .\bin\example .\bin\dll .\bin\static .\bin\include &&
appveyor PushArtifact bin\lz4_x64.zip
)
- if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw32] (
7z.exe a -bb1 bin\lz4_x86.zip NEWS .\bin\lz4.exe .\bin\README.md .\bin\example .\bin\dll .\bin\static .\bin\include &&
appveyor PushArtifact bin\lz4_x86.zip
)
- if [%COMPILER%]==[gcc] (COPY tests\*.exe programs\)
- if [%COMPILER%]==[visual] (
ECHO *** &&
ECHO *** Building Visual Studio 2010 %PLATFORM%\%CONFIGURATION% &&
ECHO *** &&
msbuild "build\VS2010\lz4.sln" %ADDITIONALPARAM% /m /verbosity:minimal /property:PlatformToolset=v100 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /p:EnableWholeProgramOptimization=true /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
ECHO *** &&
ECHO *** Building Visual Studio 2012 %PLATFORM%\%CONFIGURATION% &&
ECHO *** &&
msbuild "build\VS2010\lz4.sln" /m /verbosity:minimal /property:PlatformToolset=v110 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
ECHO *** &&
ECHO *** Building Visual Studio 2013 %PLATFORM%\%CONFIGURATION% &&
ECHO *** &&
msbuild "build\VS2010\lz4.sln" /m /verbosity:minimal /property:PlatformToolset=v120 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
ECHO *** &&
ECHO *** Building Visual Studio 2015 %PLATFORM%\%CONFIGURATION% &&
ECHO *** &&
msbuild "build\VS2010\lz4.sln" /m /verbosity:minimal /property:PlatformToolset=v140 /t:Clean,Build /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
COPY build\VS2010\bin\%PLATFORM%_%CONFIGURATION%\*.exe programs\
make -j -C programs lz4 V=1 &&
make -j -C tests fullbench V=1 &&
make -j -C tests fuzzer V=1 &&
make -j -C lib lib V=1 LDFLAGS="-static-libgcc" &&
echo "Packaging GCC build..." &&
mkdir bin\dll bin\static bin\example bin\include &&
copy tests\fullbench.c bin\example\ &&
copy lib\xxhash.* bin\example\ &&
copy lib\lz4*.h bin\include\ &&
copy lib\liblz4.a bin\static\liblz4_static.lib &&
copy lib\liblz4.dll.a bin\dll\ >nul 2>&1 &&
(copy lib\liblz4.dll bin\dll\ 2>nul || copy lib\msys-lz4-1.dll bin\dll\liblz4.dll 2>nul || copy lib\cyglz4-1.dll bin\dll\liblz4.dll 2>nul || echo DLL copy warning) &&
copy lib\dll\example\* bin\example\ >nul 2>&1 &&
copy programs\lz4.exe bin\lz4.exe &&
copy tests\*.exe programs\
)
test_script:
- ECHO *** &&
ECHO Testing %COMPILER% %PLATFORM% %CONFIGURATION% &&
ECHO ***
- if not [%COMPILER%]==[unknown] (
CD programs &&
lz4 -h &&
lz4 -i1b lz4.exe &&
lz4 -i1b5 lz4.exe &&
lz4 -i1b10 lz4.exe &&
lz4 -i1b15 lz4.exe &&
echo ------- lz4 tested ------- &&
fullbench.exe -i1 fullbench.exe &&
echo trying to launch fuzzer.exe &&
fuzzer.exe -v -T30s
# Clang Build
- if [%COMPILER%]==[clang] (
echo "Clang build started" &&
clang -v &&
make -v &&
set "CFLAGS=--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion" &&
make -j -C programs lz4 CC=clang V=1 &&
make -j -C tests fullbench CC=clang V=1 &&
make -j -C tests fuzzer CC=clang V=1 &&
make -j -C lib lib CC=clang V=1 &&
copy tests\*.exe programs\
)
# Create release archives (GCC only)
- if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw64] 7z.exe a -bb1 bin\lz4_x64.zip NEWS .\bin\lz4.exe README.md .\bin\example .\bin\dll .\bin\static .\bin\include
- if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw64] appveyor PushArtifact bin\lz4_x64.zip
- if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw32] 7z.exe a -bb1 bin\lz4_x86.zip NEWS .\bin\lz4.exe README.md .\bin\example .\bin\dll .\bin\static .\bin\include
- if [%COMPILER%]==[gcc] if [%PLATFORM%]==[mingw32] appveyor PushArtifact bin\lz4_x86.zip
test_script:
- echo "*** Testing %COMPILER% %PLATFORM% ***"
- cd programs
- lz4 -h
- lz4 -i1b lz4.exe
- lz4 -i1b5 lz4.exe
- lz4 -i1b10 lz4.exe
- lz4 -i1b15 lz4.exe
- echo "------- lz4 tested -------"
- fullbench.exe -i0 fullbench.exe
- echo "Launching fuzzer test..."
- fuzzer.exe -v -T20s
- cd ..
artifacts:
- path: bin\lz4_x64.zip
name: LZ4 Windows x64 Build
- path: bin\lz4_x86.zip
deploy:
- provider: GitHub
artifact: bin\lz4_x64.zip
auth_token:
secure: w6UJaGie0qbZvffr/fqyhO/Vj8rMiQWnv9a8qm3gxfngdHDTMT42wYupqJpIExId
force_update: true
prerelease: true
on:
COMPILER: gcc
PLATFORM: "mingw64"
appveyor_repo_tag: true
- provider: GitHub
artifact: bin\lz4_x86.zip
auth_token:
secure: w6UJaGie0qbZvffr/fqyhO/Vj8rMiQWnv9a8qm3gxfngdHDTMT42wYupqJpIExId
force_update: true
prerelease: true
on:
COMPILER: gcc
PLATFORM: "mingw32"
appveyor_repo_tag: true
name: LZ4 Windows x86 Build
+3 -15
View File
@@ -6,23 +6,11 @@ Projects for various integrated development environments (IDE)
The following projects are included with the lz4 distribution:
- `cmake` - CMake project
- `meson` - Meson project
- `VS2010` - Visual Studio 2010 project (which also works well with Visual Studio 2012, 2013, 2015)
- `VS2017` - Visual Studio 2017 project
- `visual` - scripts to generate Visual Studio solutions from `cmake` script
- `VS2022` - Visual Studio 2022 solution - will soon be deprecated, prefer `visual` generators
#### How to compile lz4 with Visual Studio
1. Install Visual Studio e.g. VS 2015 Community Edition (it's free).
2. Download the latest version of lz4 from https://github.com/lz4/lz4/releases
3. Decompress ZIP archive.
4. Go to decompressed directory then to `build` then `VS2010` and open `lz4.sln`
5. Visual Studio will ask about converting VS2010 project to VS2015 and you should agree.
6. Change `Debug` to `Release` and if you have 64-bit Windows change also `Win32` to `x64`.
7. Press F7 on keyboard or select `BUILD` from the menu bar and choose `Build Solution`.
8. If compilation will be fine a compiled executable will be in `build\VS2010\bin\x64_Release\lz4.exe`
#### Projects available within lz4.sln
#### Projects available within VS2022\lz4.sln
The Visual Studio solution file `lz4.sln` contains many projects that will be compiled to the
`build\VS2010\bin\$(Platform)_$(Configuration)` directory. For example `lz4` set to `x64` and
-169
View File
@@ -1,169 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{D745AE2F-596A-403A-9B91-81A8C6779243}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>datagen</RootNamespace>
<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>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\programs\datagen.c" />
<ClCompile Include="..\..\..\tests\datagencli.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\programs\datagen.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-176
View File
@@ -1,176 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>frametest</RootNamespace>
<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>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\lz4.c" />
<ClCompile Include="..\..\..\lib\lz4frame.c" />
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
<ClCompile Include="..\..\..\tests\frametest.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4frame.h" />
<ClInclude Include="..\..\..\lib\lz4frame_static.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -1,180 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{13992FD2-077E-4954-B065-A428198201A9}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>fullbench-dll</RootNamespace>
<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>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;LZ4_DLL_IMPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)bin\$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>liblz4.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;LZ4_DLL_IMPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)bin\$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>liblz4.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;LZ4_DLL_IMPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(SolutionDir)bin\$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>liblz4.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;LZ4_DLL_IMPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(SolutionDir)bin\$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>liblz4.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\xxhash.c" />
<ClCompile Include="..\..\..\tests\fullbench.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4frame.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-176
View File
@@ -1,176 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>fullbench</RootNamespace>
<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>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\lz4.c" />
<ClCompile Include="..\..\..\lib\lz4frame.c" />
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
<ClCompile Include="..\..\..\tests\fullbench.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4frame.h" />
<ClInclude Include="..\..\..\lib\lz4frame_static.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-173
View File
@@ -1,173 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{18B9F1A7-9C66-4352-898B-30804DADE0FD}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>fuzzer</RootNamespace>
<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>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\lz4.c" />
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
<ClCompile Include="..\..\..\tests\fuzzer.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-51
View File
@@ -1,51 +0,0 @@
// Microsoft Visual C++ generated resource script.
//
#include "lz4.h" /* LZ4_VERSION_STRING */
#define APSTUDIO_READONLY_SYMBOLS
#include "verrsrc.h"
#undef APSTUDIO_READONLY_SYMBOLS
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE 9, 1
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0
PRODUCTVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "Yann Collet"
VALUE "FileDescription", "Extremely fast compression"
VALUE "FileVersion", LZ4_VERSION_STRING
VALUE "InternalName", "lz4.dll"
VALUE "LegalCopyright", "Copyright (C) 2013-2020, Yann Collet"
VALUE "OriginalFilename", "lz4.dll"
VALUE "ProductName", "LZ4"
VALUE "ProductVersion", LZ4_VERSION_STRING
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1200
END
END
#endif
-179
View File
@@ -1,179 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{9800039D-4AAA-43A4-BB78-FEF6F4836927}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>liblz4-dll</RootNamespace>
<OutDir>$(SolutionDir)bin\$(Platform)_$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\</IntDir>
<ProjectName>liblz4-dll</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetName>liblz4</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetName>liblz4</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>liblz4</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>liblz4</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4frame.h" />
<ClInclude Include="..\..\..\lib\lz4frame_static.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\lz4.c" />
<ClCompile Include="..\..\..\lib\lz4frame.c" />
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="liblz4-dll.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-175
View File
@@ -1,175 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>liblz4</RootNamespace>
<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>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetName>liblz4_static</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetName>liblz4_static</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>liblz4_static</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>liblz4_static</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4frame.h" />
<ClInclude Include="..\..\..\lib\lz4frame_static.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\lz4.c" />
<ClCompile Include="..\..\..\lib\lz4frame.c" />
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-98
View File
@@ -1,98 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2012 for Windows Desktop
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lz4", "lz4\lz4.vcxproj", "{E30329AC-0057-4FE0-8FDA-7F650D398C4C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblz4-dll", "liblz4-dll\liblz4-dll.vcxproj", "{9800039D-4AAA-43A4-BB78-FEF6F4836927}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblz4", "liblz4\liblz4.vcxproj", "{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer", "fuzzer\fuzzer.vcxproj", "{18B9F1A7-9C66-4352-898B-30804DADE0FD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench", "fullbench\fullbench.vcxproj", "{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "frametest", "frametest\frametest.vcxproj", "{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "datagen", "datagen\datagen.vcxproj", "{D745AE2F-596A-403A-9B91-81A8C6779243}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench-dll", "fullbench-dll\fullbench-dll.vcxproj", "{13992FD2-077E-4954-B065-A428198201A9}"
ProjectSection(ProjectDependencies) = postProject
{9800039D-4AAA-43A4-BB78-FEF6F4836927} = {9800039D-4AAA-43A4-BB78-FEF6F4836927}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E30329AC-0057-4FE0-8FDA-7F650D398C4C}.Debug|Win32.ActiveCfg = Debug|Win32
{E30329AC-0057-4FE0-8FDA-7F650D398C4C}.Debug|Win32.Build.0 = Debug|Win32
{E30329AC-0057-4FE0-8FDA-7F650D398C4C}.Debug|x64.ActiveCfg = Debug|x64
{E30329AC-0057-4FE0-8FDA-7F650D398C4C}.Debug|x64.Build.0 = Debug|x64
{E30329AC-0057-4FE0-8FDA-7F650D398C4C}.Release|Win32.ActiveCfg = Release|Win32
{E30329AC-0057-4FE0-8FDA-7F650D398C4C}.Release|Win32.Build.0 = Release|Win32
{E30329AC-0057-4FE0-8FDA-7F650D398C4C}.Release|x64.ActiveCfg = Release|x64
{E30329AC-0057-4FE0-8FDA-7F650D398C4C}.Release|x64.Build.0 = Release|x64
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|Win32.ActiveCfg = Debug|Win32
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|Win32.Build.0 = Debug|Win32
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|x64.ActiveCfg = Debug|x64
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|x64.Build.0 = Debug|x64
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|Win32.ActiveCfg = Release|Win32
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|Win32.Build.0 = Release|Win32
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|x64.ActiveCfg = Release|x64
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|x64.Build.0 = Release|x64
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|Win32.ActiveCfg = Debug|Win32
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|Win32.Build.0 = Debug|Win32
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|x64.ActiveCfg = Debug|x64
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|x64.Build.0 = Debug|x64
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|Win32.ActiveCfg = Release|Win32
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|Win32.Build.0 = Release|Win32
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|x64.ActiveCfg = Release|x64
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|x64.Build.0 = Release|x64
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|Win32.ActiveCfg = Debug|Win32
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|Win32.Build.0 = Debug|Win32
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|x64.ActiveCfg = Debug|x64
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|x64.Build.0 = Debug|x64
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Release|Win32.ActiveCfg = Release|Win32
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Release|Win32.Build.0 = Release|Win32
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Release|x64.ActiveCfg = Release|x64
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Release|x64.Build.0 = Release|x64
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Debug|Win32.ActiveCfg = Debug|Win32
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Debug|Win32.Build.0 = Debug|Win32
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Debug|x64.ActiveCfg = Debug|x64
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Debug|x64.Build.0 = Debug|x64
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Release|Win32.ActiveCfg = Release|Win32
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Release|Win32.Build.0 = Release|Win32
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Release|x64.ActiveCfg = Release|x64
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Release|x64.Build.0 = Release|x64
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Debug|Win32.ActiveCfg = Debug|Win32
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Debug|Win32.Build.0 = Debug|Win32
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Debug|x64.ActiveCfg = Debug|x64
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Debug|x64.Build.0 = Debug|x64
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Release|Win32.ActiveCfg = Release|Win32
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Release|Win32.Build.0 = Release|Win32
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Release|x64.ActiveCfg = Release|x64
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Release|x64.Build.0 = Release|x64
{D745AE2F-596A-403A-9B91-81A8C6779243}.Debug|Win32.ActiveCfg = Debug|Win32
{D745AE2F-596A-403A-9B91-81A8C6779243}.Debug|Win32.Build.0 = Debug|Win32
{D745AE2F-596A-403A-9B91-81A8C6779243}.Debug|x64.ActiveCfg = Debug|x64
{D745AE2F-596A-403A-9B91-81A8C6779243}.Debug|x64.Build.0 = Debug|x64
{D745AE2F-596A-403A-9B91-81A8C6779243}.Release|Win32.ActiveCfg = Release|Win32
{D745AE2F-596A-403A-9B91-81A8C6779243}.Release|Win32.Build.0 = Release|Win32
{D745AE2F-596A-403A-9B91-81A8C6779243}.Release|x64.ActiveCfg = Release|x64
{D745AE2F-596A-403A-9B91-81A8C6779243}.Release|x64.Build.0 = Release|x64
{13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.ActiveCfg = Debug|Win32
{13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.Build.0 = Debug|Win32
{13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.ActiveCfg = Debug|x64
{13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.Build.0 = Debug|x64
{13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.ActiveCfg = Release|Win32
{13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.Build.0 = Release|Win32
{13992FD2-077E-4954-B065-A428198201A9}.Release|x64.ActiveCfg = Release|x64
{13992FD2-077E-4954-B065-A428198201A9}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
-51
View File
@@ -1,51 +0,0 @@
// Microsoft Visual C++ generated resource script.
//
#include "lz4.h" /* LZ4_VERSION_STRING */
#define APSTUDIO_READONLY_SYMBOLS
#include "verrsrc.h"
#undef APSTUDIO_READONLY_SYMBOLS
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE 9, 1
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0
PRODUCTVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "Yann Collet"
VALUE "FileDescription", "Extremely fast compression"
VALUE "FileVersion", LZ4_VERSION_STRING
VALUE "InternalName", "lz4.exe"
VALUE "LegalCopyright", "Copyright (C) 2013-2020, Yann Collet"
VALUE "OriginalFilename", "lz4.exe"
VALUE "ProductName", "LZ4"
VALUE "ProductVersion", LZ4_VERSION_STRING
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1200
END
END
#endif
-189
View File
@@ -1,189 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{E30329AC-0057-4FE0-8FDA-7F650D398C4C}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>lz4</RootNamespace>
<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>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>setargv.obj;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4frame.h" />
<ClInclude Include="..\..\..\lib\lz4frame_static.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
<ClInclude Include="..\..\..\programs\datagen.h" />
<ClInclude Include="..\..\..\programs\bench.h" />
<ClInclude Include="..\..\..\programs\lz4io.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\lz4.c" />
<ClCompile Include="..\..\..\lib\lz4frame.c" />
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
<ClCompile Include="..\..\..\programs\datagen.c" />
<ClCompile Include="..\..\..\programs\bench.c" />
<ClCompile Include="..\..\..\programs\lz4cli.c" />
<ClCompile Include="..\..\..\programs\lz4io.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="lz4.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-173
View File
@@ -1,173 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{D745AE2F-596A-403A-9B91-81A8C6779243}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>datagen</RootNamespace>
<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>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\programs\datagen.c" />
<ClCompile Include="..\..\..\tests\datagencli.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\programs\datagen.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-180
View File
@@ -1,180 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>frametest</RootNamespace>
<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>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\lz4.c" />
<ClCompile Include="..\..\..\lib\lz4frame.c" />
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
<ClCompile Include="..\..\..\tests\frametest.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4frame.h" />
<ClInclude Include="..\..\..\lib\lz4frame_static.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -1,184 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{13992FD2-077E-4954-B065-A428198201A9}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>fullbench-dll</RootNamespace>
<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>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;LZ4_DLL_IMPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)bin\$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>liblz4.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;LZ4_DLL_IMPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)bin\$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>liblz4.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;LZ4_DLL_IMPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(SolutionDir)bin\$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>liblz4.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;LZ4_DLL_IMPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(SolutionDir)bin\$(Platform)_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>liblz4.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\xxhash.c" />
<ClCompile Include="..\..\..\tests\fullbench.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4frame.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-180
View File
@@ -1,180 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>fullbench</RootNamespace>
<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>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\lz4.c" />
<ClCompile Include="..\..\..\lib\lz4frame.c" />
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
<ClCompile Include="..\..\..\tests\fullbench.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4frame.h" />
<ClInclude Include="..\..\..\lib\lz4frame_static.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-177
View File
@@ -1,177 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{18B9F1A7-9C66-4352-898B-30804DADE0FD}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>fuzzer</RootNamespace>
<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>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\lz4.c" />
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
<ClCompile Include="..\..\..\tests\fuzzer.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-51
View File
@@ -1,51 +0,0 @@
// Microsoft Visual C++ generated resource script.
//
#include "lz4.h" /* LZ4_VERSION_STRING */
#define APSTUDIO_READONLY_SYMBOLS
#include "verrsrc.h"
#undef APSTUDIO_READONLY_SYMBOLS
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE 9, 1
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0
PRODUCTVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "Yann Collet"
VALUE "FileDescription", "Extremely fast compression"
VALUE "FileVersion", LZ4_VERSION_STRING
VALUE "InternalName", "lz4.dll"
VALUE "LegalCopyright", "Copyright (C) 2013-2020, Yann Collet"
VALUE "OriginalFilename", "lz4.dll"
VALUE "ProductName", "LZ4"
VALUE "ProductVersion", LZ4_VERSION_STRING
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1200
END
END
#endif
-183
View File
@@ -1,183 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{9800039D-4AAA-43A4-BB78-FEF6F4836927}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>liblz4-dll</RootNamespace>
<OutDir>$(SolutionDir)bin\$(Platform)_$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\</IntDir>
<ProjectName>liblz4-dll</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetName>liblz4</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetName>liblz4</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>liblz4</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>liblz4</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4frame.h" />
<ClInclude Include="..\..\..\lib\lz4frame_static.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\lz4.c" />
<ClCompile Include="..\..\..\lib\lz4frame.c" />
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="liblz4-dll.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-179
View File
@@ -1,179 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>liblz4</RootNamespace>
<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>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="'$(EnableWholeProgramOptimization)'=='true'">true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetName>liblz4_static</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetName>liblz4_static</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>liblz4_static</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>liblz4_static</TargetName>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>false</EnablePREfast>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>false</TreatWarningAsError>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary Condition="'$(UseStaticCRT)'=='true'">MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4frame.h" />
<ClInclude Include="..\..\..\lib\lz4frame_static.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\lz4.c" />
<ClCompile Include="..\..\..\lib\lz4frame.c" />
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-103
View File
@@ -1,103 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.271
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblz4-dll", "liblz4-dll\liblz4-dll.vcxproj", "{9800039D-4AAA-43A4-BB78-FEF6F4836927}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblz4", "liblz4\liblz4.vcxproj", "{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer", "fuzzer\fuzzer.vcxproj", "{18B9F1A7-9C66-4352-898B-30804DADE0FD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench", "fullbench\fullbench.vcxproj", "{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "frametest", "frametest\frametest.vcxproj", "{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "datagen", "datagen\datagen.vcxproj", "{D745AE2F-596A-403A-9B91-81A8C6779243}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench-dll", "fullbench-dll\fullbench-dll.vcxproj", "{13992FD2-077E-4954-B065-A428198201A9}"
ProjectSection(ProjectDependencies) = postProject
{9800039D-4AAA-43A4-BB78-FEF6F4836927} = {9800039D-4AAA-43A4-BB78-FEF6F4836927}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lz4", "lz4\lz4.vcxproj", "{60A3115E-B988-41EE-8815-F4D4F253D866}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|Win32.ActiveCfg = Debug|Win32
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|Win32.Build.0 = Debug|Win32
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|x64.ActiveCfg = Debug|x64
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|x64.Build.0 = Debug|x64
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|Win32.ActiveCfg = Release|Win32
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|Win32.Build.0 = Release|Win32
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|x64.ActiveCfg = Release|x64
{9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|x64.Build.0 = Release|x64
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|Win32.ActiveCfg = Debug|Win32
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|Win32.Build.0 = Debug|Win32
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|x64.ActiveCfg = Debug|x64
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|x64.Build.0 = Debug|x64
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|Win32.ActiveCfg = Release|Win32
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|Win32.Build.0 = Release|Win32
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|x64.ActiveCfg = Release|x64
{9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|x64.Build.0 = Release|x64
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|Win32.ActiveCfg = Debug|Win32
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|Win32.Build.0 = Debug|Win32
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|x64.ActiveCfg = Debug|x64
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|x64.Build.0 = Debug|x64
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Release|Win32.ActiveCfg = Release|Win32
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Release|Win32.Build.0 = Release|Win32
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Release|x64.ActiveCfg = Release|x64
{18B9F1A7-9C66-4352-898B-30804DADE0FD}.Release|x64.Build.0 = Release|x64
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Debug|Win32.ActiveCfg = Debug|Win32
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Debug|Win32.Build.0 = Debug|Win32
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Debug|x64.ActiveCfg = Debug|x64
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Debug|x64.Build.0 = Debug|x64
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Release|Win32.ActiveCfg = Release|Win32
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Release|Win32.Build.0 = Release|Win32
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Release|x64.ActiveCfg = Release|x64
{6A4DF4EF-C77F-43C6-8901-DDCD20879E4E}.Release|x64.Build.0 = Release|x64
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Debug|Win32.ActiveCfg = Debug|Win32
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Debug|Win32.Build.0 = Debug|Win32
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Debug|x64.ActiveCfg = Debug|x64
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Debug|x64.Build.0 = Debug|x64
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Release|Win32.ActiveCfg = Release|Win32
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Release|Win32.Build.0 = Release|Win32
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Release|x64.ActiveCfg = Release|x64
{39AD6ECC-8BAD-4368-95E4-A1AA2F077BB7}.Release|x64.Build.0 = Release|x64
{D745AE2F-596A-403A-9B91-81A8C6779243}.Debug|Win32.ActiveCfg = Debug|Win32
{D745AE2F-596A-403A-9B91-81A8C6779243}.Debug|Win32.Build.0 = Debug|Win32
{D745AE2F-596A-403A-9B91-81A8C6779243}.Debug|x64.ActiveCfg = Debug|x64
{D745AE2F-596A-403A-9B91-81A8C6779243}.Debug|x64.Build.0 = Debug|x64
{D745AE2F-596A-403A-9B91-81A8C6779243}.Release|Win32.ActiveCfg = Release|Win32
{D745AE2F-596A-403A-9B91-81A8C6779243}.Release|Win32.Build.0 = Release|Win32
{D745AE2F-596A-403A-9B91-81A8C6779243}.Release|x64.ActiveCfg = Release|x64
{D745AE2F-596A-403A-9B91-81A8C6779243}.Release|x64.Build.0 = Release|x64
{13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.ActiveCfg = Debug|Win32
{13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.Build.0 = Debug|Win32
{13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.ActiveCfg = Debug|x64
{13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.Build.0 = Debug|x64
{13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.ActiveCfg = Release|Win32
{13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.Build.0 = Release|Win32
{13992FD2-077E-4954-B065-A428198201A9}.Release|x64.ActiveCfg = Release|x64
{13992FD2-077E-4954-B065-A428198201A9}.Release|x64.Build.0 = Release|x64
{60A3115E-B988-41EE-8815-F4D4F253D866}.Debug|Win32.ActiveCfg = Debug|Win32
{60A3115E-B988-41EE-8815-F4D4F253D866}.Debug|Win32.Build.0 = Debug|Win32
{60A3115E-B988-41EE-8815-F4D4F253D866}.Debug|x64.ActiveCfg = Debug|x64
{60A3115E-B988-41EE-8815-F4D4F253D866}.Debug|x64.Build.0 = Debug|x64
{60A3115E-B988-41EE-8815-F4D4F253D866}.Release|Win32.ActiveCfg = Release|Win32
{60A3115E-B988-41EE-8815-F4D4F253D866}.Release|Win32.Build.0 = Release|Win32
{60A3115E-B988-41EE-8815-F4D4F253D866}.Release|x64.ActiveCfg = Release|x64
{60A3115E-B988-41EE-8815-F4D4F253D866}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BBC259B2-BABF-47CD-8A6A-7B8318A803AC}
EndGlobalSection
EndGlobal
-51
View File
@@ -1,51 +0,0 @@
// Microsoft Visual C++ generated resource script.
//
#include "lz4.h" /* LZ4_VERSION_STRING */
#define APSTUDIO_READONLY_SYMBOLS
#include "verrsrc.h"
#undef APSTUDIO_READONLY_SYMBOLS
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE 9, 1
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0
PRODUCTVERSION LZ4_VERSION_MAJOR,LZ4_VERSION_MINOR,LZ4_VERSION_RELEASE,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "Yann Collet"
VALUE "FileDescription", "Extremely fast compression"
VALUE "FileVersion", LZ4_VERSION_STRING
VALUE "InternalName", "lz4.exe"
VALUE "LegalCopyright", "Copyright (C) 2013-2020, Yann Collet"
VALUE "OriginalFilename", "lz4.exe"
VALUE "ProductName", "LZ4"
VALUE "ProductVersion", LZ4_VERSION_STRING
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1200
END
END
#endif
-175
View File
@@ -1,175 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{60A3115E-B988-41EE-8815-F4D4F253D866}</ProjectGuid>
<RootNamespace>lz4</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)_$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\</IntDir>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)bin\$(Platform)_$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\</IntDir>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)_$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\</IntDir>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)bin\$(Platform)_$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\</IntDir>
<IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>false</EnableCOMDATFolding>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\lz4.c" />
<ClCompile Include="..\..\..\lib\lz4frame.c" />
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
<ClCompile Include="..\..\..\programs\bench.c" />
<ClCompile Include="..\..\..\programs\datagen.c" />
<ClCompile Include="..\..\..\programs\lz4cli.c" />
<ClCompile Include="..\..\..\programs\lz4io.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4frame.h" />
<ClInclude Include="..\..\..\lib\lz4frame_static.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
<ClInclude Include="..\..\..\programs\bench.h" />
<ClInclude Include="..\..\..\programs\datagen.h" />
<ClInclude Include="..\..\..\programs\lz4io.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="lz4.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+7 -3
View File
@@ -161,13 +161,17 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\programs\datagen.c" />
<ClCompile Include="..\..\..\programs\lorem.c" />
<ClCompile Include="..\..\..\tests\datagen.c" />
<ClCompile Include="..\..\..\tests\datagencli.c" />
<ClCompile Include="..\..\..\tests\loremOut.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\programs\datagen.h" />
<ClInclude Include="..\..\..\programs\lorem.h" />
<ClInclude Include="..\..\..\tests\datagen.h" />
<ClInclude Include="..\..\..\tests\loremOut.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
+3 -1
View File
@@ -162,6 +162,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\lib\lz4.c" />
<ClCompile Include="..\..\..\lib\lz4file.c" />
<ClCompile Include="..\..\..\lib\lz4frame.c" />
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
@@ -169,6 +170,7 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
<ClInclude Include="..\..\..\lib\lz4file.h" />
<ClInclude Include="..\..\..\lib\lz4frame.h" />
<ClInclude Include="..\..\..\lib\lz4frame_static.h" />
<ClInclude Include="..\..\..\lib\lz4hc.h" />
@@ -177,4 +179,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
+7 -3
View File
@@ -162,9 +162,12 @@
<ClCompile Include="..\..\..\lib\lz4hc.c" />
<ClCompile Include="..\..\..\lib\xxhash.c" />
<ClCompile Include="..\..\..\programs\bench.c" />
<ClCompile Include="..\..\..\programs\datagen.c" />
<ClCompile Include="..\..\..\programs\lorem.c" />
<ClCompile Include="..\..\..\programs\lz4cli.c" />
<ClCompile Include="..\..\..\programs\lz4io.c" />
<ClCompile Include="..\..\..\programs\threadpool.c" />
<ClCompile Include="..\..\..\programs\timefn.c" />
<ClCompile Include="..\..\..\programs\util.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\lz4.h" />
@@ -173,8 +176,9 @@
<ClInclude Include="..\..\..\lib\lz4hc.h" />
<ClInclude Include="..\..\..\lib\xxhash.h" />
<ClInclude Include="..\..\..\programs\bench.h" />
<ClInclude Include="..\..\..\programs\datagen.h" />
<ClInclude Include="..\..\..\programs\lorem.h" />
<ClInclude Include="..\..\..\programs\lz4io.h" />
<ClInclude Include="..\..\..\programs\util.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="lz4.rc" />
@@ -182,4 +186,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
+190 -103
View File
@@ -6,46 +6,69 @@
# any warranty.
#
# For details, see <http://creativecommons.org/publicdomain/zero/1.0/>.
#
# LZ4's CMake support is maintained by Evan Nemerson; when filing
# bugs please mention @nemequ to make sure I see it.
cmake_minimum_required(VERSION 3.5)
# Use range version specification for policy control while maintaining
# compatibility with older CMake versions
cmake_minimum_required(VERSION 3.5...4.0.2)
set(LZ4_TOP_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..")
# Parse version information
file(STRINGS "${LZ4_TOP_SOURCE_DIR}/lib/lz4.h" LZ4_VERSION_MAJOR REGEX "^#define LZ4_VERSION_MAJOR +([0-9]+) +.*$")
string(REGEX REPLACE "^#define LZ4_VERSION_MAJOR +([0-9]+) +.*$" "\\1" LZ4_VERSION_MAJOR "${LZ4_VERSION_MAJOR}")
file(STRINGS "${LZ4_TOP_SOURCE_DIR}/lib/lz4.h" LZ4_VERSION_MINOR REGEX "^#define LZ4_VERSION_MINOR +([0-9]+) +.*$")
string(REGEX REPLACE "^#define LZ4_VERSION_MINOR +([0-9]+) +.*$" "\\1" LZ4_VERSION_MINOR "${LZ4_VERSION_MINOR}")
file(STRINGS "${LZ4_TOP_SOURCE_DIR}/lib/lz4.h" LZ4_VERSION_RELEASE REGEX "^#define LZ4_VERSION_RELEASE +([0-9]+) +.*$")
string(REGEX REPLACE "^#define LZ4_VERSION_RELEASE +([0-9]+) +.*$" "\\1" LZ4_VERSION_RELEASE "${LZ4_VERSION_RELEASE}")
#-----------------------------------------------------------------------------
# VERSION EXTRACTION - Parse version information from header file
#-----------------------------------------------------------------------------
function(parse_lz4_version VERSION_TYPE)
file(STRINGS "${LZ4_TOP_SOURCE_DIR}/lib/lz4.h" version_line REGEX "^#define LZ4_VERSION_${VERSION_TYPE} +([0-9]+).*$")
string(REGEX REPLACE "^#define LZ4_VERSION_${VERSION_TYPE} +([0-9]+).*$" "\\1" version_number "${version_line}")
set(LZ4_VERSION_${VERSION_TYPE} ${version_number} PARENT_SCOPE)
endfunction()
foreach(version_type IN ITEMS MAJOR MINOR RELEASE)
parse_lz4_version(${version_type})
endforeach()
set(LZ4_VERSION_STRING "${LZ4_VERSION_MAJOR}.${LZ4_VERSION_MINOR}.${LZ4_VERSION_RELEASE}")
mark_as_advanced(LZ4_VERSION_STRING LZ4_VERSION_MAJOR LZ4_VERSION_MINOR LZ4_VERSION_RELEASE)
message(STATUS "Creating build script for LZ4 version: ${LZ4_VERSION_STRING}")
project(LZ4 VERSION ${LZ4_VERSION_STRING} LANGUAGES C)
option(LZ4_BUILD_CLI "Build lz4 program" ON)
option(LZ4_BUILD_LEGACY_LZ4C "Build lz4c program with legacy argument support" ON)
#-----------------------------------------------------------------------------
# DEFAULT BUILD TYPE - Set Release as default when no build type is specified
#-----------------------------------------------------------------------------
# Set a default build type if none was specified
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
# If LZ4 is being bundled in another project, we don't want to
# install anything. However, we want to let people override this, so
# we'll use the LZ4_BUNDLED_MODE variable to let them do that; just
# set it to OFF in your project before you add_subdirectory(lz4/contrib/cmake_unofficial).
get_directory_property(LZ4_PARENT_DIRECTORY PARENT_DIRECTORY)
if("${LZ4_BUNDLED_MODE}" STREQUAL "")
# Bundled mode hasn't been set one way or the other, set the default
# depending on whether or not we are the top-level project.
if("${LZ4_PARENT_DIRECTORY}" STREQUAL "")
set(LZ4_BUNDLED_MODE OFF)
else()
#-----------------------------------------------------------------------------
# BUILD OPTIONS - Configure build targets and features
#-----------------------------------------------------------------------------
option(LZ4_BUILD_CLI "Build lz4 program" ON)
option(LZ4_BUILD_LEGACY_LZ4C "Build lz4c program with legacy argument support" OFF)
# Determine if LZ4 is being built as part of another project.
# If LZ4 is bundled in another project, we don't want to install anything.
# Default behavior can be overridden by setting the LZ4_BUNDLED_MODE variable.
if(NOT DEFINED LZ4_BUNDLED_MODE)
get_directory_property(LZ4_IS_SUBPROJECT PARENT_DIRECTORY)
if(LZ4_IS_SUBPROJECT)
set(LZ4_BUNDLED_MODE ON)
else()
set(LZ4_BUNDLED_MODE OFF)
endif()
endif()
mark_as_advanced(LZ4_BUNDLED_MODE)
# CPack
#-----------------------------------------------------------------------------
# PACKAGING - CPack configuration
#-----------------------------------------------------------------------------
if(NOT LZ4_BUNDLED_MODE AND NOT CPack_CMake_INCLUDED)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LZ4 compression library")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${LZ4_TOP_SOURCE_DIR}/README.md")
@@ -56,6 +79,9 @@ if(NOT LZ4_BUNDLED_MODE AND NOT CPack_CMake_INCLUDED)
include(CPack)
endif(NOT LZ4_BUNDLED_MODE AND NOT CPack_CMake_INCLUDED)
#-----------------------------------------------------------------------------
# LIBRARY TYPE CONFIGURATION - Static vs Shared libraries
#-----------------------------------------------------------------------------
# Allow people to choose whether to build shared or static libraries
# via the BUILD_SHARED_LIBS option unless we are in bundled mode, in
# which case we always use static libraries.
@@ -65,33 +91,40 @@ CMAKE_DEPENDENT_OPTION(BUILD_STATIC_LIBS "Build static libraries" OFF "BUILD_SHA
if(NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS)
message(FATAL_ERROR "Both BUILD_SHARED_LIBS and BUILD_STATIC_LIBS have been disabled")
endif()
endif(NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS)
#-----------------------------------------------------------------------------
# SOURCE FILES & DIRECTORIES - Path setup and source file collection
#-----------------------------------------------------------------------------
set(LZ4_LIB_SOURCE_DIR "${LZ4_TOP_SOURCE_DIR}/lib")
set(LZ4_PROG_SOURCE_DIR "${LZ4_TOP_SOURCE_DIR}/programs")
include_directories("${LZ4_LIB_SOURCE_DIR}")
# CLI sources
set(LZ4_SOURCES
"${LZ4_LIB_SOURCE_DIR}/lz4.c"
"${LZ4_LIB_SOURCE_DIR}/lz4hc.c"
"${LZ4_LIB_SOURCE_DIR}/lz4.h"
"${LZ4_LIB_SOURCE_DIR}/lz4hc.h"
"${LZ4_LIB_SOURCE_DIR}/lz4frame.c"
"${LZ4_LIB_SOURCE_DIR}/lz4frame.h"
"${LZ4_LIB_SOURCE_DIR}/xxhash.c")
set(LZ4_CLI_SOURCES
"${LZ4_PROG_SOURCE_DIR}/bench.c"
"${LZ4_PROG_SOURCE_DIR}/lz4cli.c"
"${LZ4_PROG_SOURCE_DIR}/lz4io.c"
"${LZ4_PROG_SOURCE_DIR}/datagen.c")
file(GLOB LZ4_SOURCES
"${LZ4_LIB_SOURCE_DIR}/*.c")
file(GLOB LZ4_CLI_SOURCES
"${LZ4_PROG_SOURCE_DIR}/*.c")
list(APPEND LZ4_CLI_SOURCES ${LZ4_SOURCES}) # LZ4_CLI always use liblz4 sources directly.
#-----------------------------------------------------------------------------
# POSITION INDEPENDENT CODE - PIC settings for static libraries
#-----------------------------------------------------------------------------
# Whether to use position independent code for the static library. If
# we're building a shared library this is ignored and PIC is always
# used.
option(LZ4_POSITION_INDEPENDENT_LIB "Use position independent code for static library (if applicable)" ON)
if(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE OR CMAKE_POSITION_INDEPENDENT_CODE)
set(LZ4_POSITION_INDEPENDENT_LIB_DEFAULT ON)
else()
set(LZ4_POSITION_INDEPENDENT_LIB_DEFAULT OFF)
endif(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE OR CMAKE_POSITION_INDEPENDENT_CODE)
option(LZ4_POSITION_INDEPENDENT_LIB "Use position independent code for static library (if applicable)" ${LZ4_POSITION_INDEPENDENT_LIB_DEFAULT})
#-----------------------------------------------------------------------------
# TARGETS - Library and executable targets
#-----------------------------------------------------------------------------
# liblz4
include(GNUInstallDirs)
set(LZ4_LIBRARIES_BUILT)
@@ -107,14 +140,14 @@ if(BUILD_SHARED_LIBS)
if(MSVC)
target_compile_definitions(lz4_shared PRIVATE
LZ4_DLL_EXPORT=1)
endif()
endif(MSVC)
list(APPEND LZ4_LIBRARIES_BUILT lz4_shared)
endif()
if(BUILD_STATIC_LIBS)
set(STATIC_LIB_NAME lz4)
if (MSVC AND BUILD_SHARED_LIBS)
if(MSVC AND BUILD_SHARED_LIBS)
set(STATIC_LIB_NAME lz4_static)
endif()
endif(MSVC AND BUILD_SHARED_LIBS)
add_library(lz4_static STATIC ${LZ4_SOURCES})
target_include_directories(lz4_static
PUBLIC $<BUILD_INTERFACE:${LZ4_LIB_SOURCE_DIR}>
@@ -124,74 +157,112 @@ if(BUILD_STATIC_LIBS)
POSITION_INDEPENDENT_CODE ${LZ4_POSITION_INDEPENDENT_LIB})
list(APPEND LZ4_LIBRARIES_BUILT lz4_static)
endif()
# xxhash namesapce
# Add unified target.
add_library(lz4 INTERFACE)
list(APPEND LZ4_LIBRARIES_BUILT lz4)
if(BUILD_SHARED_LIBS)
target_compile_definitions(lz4_shared PRIVATE
XXH_NAMESPACE=LZ4_)
endif()
if(BUILD_STATIC_LIBS)
target_compile_definitions(lz4_static PRIVATE
XXH_NAMESPACE=LZ4_)
endif()
if(BUILD_STATIC_LIBS)
set(LZ4_LINK_LIBRARY lz4_static)
target_link_libraries(lz4 INTERFACE lz4_shared)
else()
list(APPEND LZ4_CLI_SOURCES ${LZ4_SOURCES})
target_link_libraries(lz4 INTERFACE lz4_static)
endif(BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# DEBUG CONFIGURATION - Configurable LZ4_DEBUG level
#-----------------------------------------------------------------------------
# LZ4_DEBUG levels:
# 0 - Disable everything (default for Release)
# 1 - Enable assert() statements
# 2-8 - Enable debug traces with increasing verbosity
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(LZ4_DEBUG_LEVEL_DEFAULT 1)
else()
set(LZ4_DEBUG_LEVEL_DEFAULT 0)
endif()
set(LZ4_DEBUG_LEVEL ${LZ4_DEBUG_LEVEL_DEFAULT} CACHE STRING
"LZ4 debug level: 0=disabled, 1=assert(), 2-8=debug traces with increasing verbosity")
set_property(CACHE LZ4_DEBUG_LEVEL PROPERTY STRINGS "0" "1" "2" "3" "4" "5" "6" "7" "8")
# Apply LZ4_DEBUG configuration if level > 0
if(LZ4_DEBUG_LEVEL GREATER 0)
if(MSVC)
add_definitions(/DLZ4_DEBUG=${LZ4_DEBUG_LEVEL})
else()
add_definitions(-DLZ4_DEBUG=${LZ4_DEBUG_LEVEL})
endif()
endif()
#-----------------------------------------------------------------------------
# NAMESPACE CONFIGURATION - xxHash namespace settings
#-----------------------------------------------------------------------------
# xxhash namespace
if(BUILD_SHARED_LIBS)
target_compile_definitions(lz4_shared PRIVATE
XXH_NAMESPACE=LZ4_)
endif(BUILD_SHARED_LIBS)
if(BUILD_STATIC_LIBS)
target_compile_definitions(lz4_static PRIVATE
XXH_NAMESPACE=LZ4_)
endif(BUILD_STATIC_LIBS)
#-----------------------------------------------------------------------------
# CLI EXECUTABLES - Configuring command-line programs
#-----------------------------------------------------------------------------
# lz4
if (LZ4_BUILD_CLI)
if(LZ4_BUILD_CLI)
set(LZ4_PROGRAMS_BUILT lz4cli)
add_executable(lz4cli ${LZ4_CLI_SOURCES})
set_target_properties(lz4cli PROPERTIES OUTPUT_NAME lz4)
if (BUILD_STATIC_LIBS)
target_link_libraries(lz4cli ${LZ4_LINK_LIBRARY})
endif()
endif()
endif(LZ4_BUILD_CLI)
# lz4c
if (LZ4_BUILD_LEGACY_LZ4C)
if(LZ4_BUILD_LEGACY_LZ4C)
list(APPEND LZ4_PROGRAMS_BUILT lz4c)
add_executable(lz4c ${LZ4_CLI_SOURCES})
set_target_properties(lz4c PROPERTIES COMPILE_DEFINITIONS "ENABLE_LZ4C_LEGACY_OPTIONS")
if (BUILD_STATIC_LIBS)
target_link_libraries(lz4c ${LZ4_LINK_LIBRARY})
endif()
endif()
endif(LZ4_BUILD_LEGACY_LZ4C)
#-----------------------------------------------------------------------------
# COMPILER FLAGS - Configure warning flags and compiler-specific options
#-----------------------------------------------------------------------------
# Extra warning flags
include (CheckCCompilerFlag)
foreach (flag
# GCC-style
-Wall
-Wextra
-Wundef
-Wcast-qual
-Wcast-align
-Wshadow
-Wswitch-enum
-Wdeclaration-after-statement
-Wstrict-prototypes
-Wpointer-arith
if(MSVC)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /W4")
else()
include(CheckCCompilerFlag)
foreach(flag
# GCC-style
-pedantic-errors
-Wall
-Wextra
-Wundef
-Wcast-qual
-Wcast-align
-Wshadow
-Wswitch-enum
-Wdeclaration-after-statement
-Wstrict-prototypes
-Wpointer-arith)
# MSVC-style
/W4)
# Because https://gcc.gnu.org/wiki/FAQ#wnowarning
string(REGEX REPLACE "\\-Wno\\-(.+)" "-W\\1" flag_to_test "${flag}")
string(REGEX REPLACE "[^a-zA-Z0-9]+" "_" test_name "CFLAG_${flag_to_test}")
# Because https://gcc.gnu.org/wiki/FAQ#wnowarning
string(REGEX REPLACE "\\-Wno\\-(.+)" "-W\\1" flag_to_test "${flag}")
string(REGEX REPLACE "[^a-zA-Z0-9]+" "_" test_name "CFLAG_${flag_to_test}")
check_c_compiler_flag("${ADD_COMPILER_FLAGS_PREPEND} ${flag_to_test}" ${test_name})
check_c_compiler_flag("${ADD_COMPILER_FLAGS_PREPEND} ${flag_to_test}" ${test_name})
if(${test_name})
set(CMAKE_C_FLAGS "${flag} ${CMAKE_C_FLAGS}")
endif()
if(${test_name})
set(CMAKE_C_FLAGS_DEBUG "${flag} ${CMAKE_C_FLAGS_DEBUG}")
endif()
unset(test_name)
unset(flag_to_test)
endforeach (flag)
unset(test_name)
unset(flag_to_test)
endforeach(flag)
endif(MSVC)
#-----------------------------------------------------------------------------
# INSTALLATION - Install targets, headers, and documentation
#-----------------------------------------------------------------------------
if(NOT LZ4_BUNDLED_MODE)
install(TARGETS ${LZ4_PROGRAMS_BUILT}
BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}"
@@ -203,14 +274,18 @@ if(NOT LZ4_BUNDLED_MODE)
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(FILES
"${LZ4_LIB_SOURCE_DIR}/lz4.h"
"${LZ4_LIB_SOURCE_DIR}/lz4frame.h"
"${LZ4_LIB_SOURCE_DIR}/lz4hc.h"
"${LZ4_LIB_SOURCE_DIR}/lz4frame.h"
"${LZ4_LIB_SOURCE_DIR}/lz4file.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
install(FILES "${LZ4_PROG_SOURCE_DIR}/lz4.1"
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblz4.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
#-----------------------------------------------------------------------------
# CMAKE PACKAGE CONFIG - Configure CMake package for find_package support
#-----------------------------------------------------------------------------
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/lz4ConfigVersion.cmake"
@@ -235,16 +310,25 @@ if(NOT LZ4_BUNDLED_MODE)
${CMAKE_CURRENT_BINARY_DIR}/lz4ConfigVersion.cmake
DESTINATION ${LZ4_PKG_INSTALLDIR})
# install lz4cat and unlz4 symlinks on *nix
#-----------------------------------------------------------------------------
# SYMLINKS - Create and install Unix symlinks and manpage aliases
#-----------------------------------------------------------------------------
# Install lz4cat and unlz4 symlinks on Unix systems
if(UNIX AND LZ4_BUILD_CLI)
install(CODE "
foreach(f lz4cat unlz4)
set(dest \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/\${f}\")
message(STATUS \"Symlinking: \${dest} -> lz4\")
execute_process(
COMMAND \"${CMAKE_COMMAND}\" -E create_symlink lz4 \"\${dest}\")
endforeach()
")
foreach(cli_tool IN ITEMS lz4cat unlz4)
# Create a custom target for the symlink creation
add_custom_target("create_${cli_tool}_symlink" ALL
COMMAND ${CMAKE_COMMAND} -E create_symlink
$<TARGET_FILE_NAME:lz4cli> ${cli_tool}
DEPENDS lz4cli
COMMENT "Creating symlink for ${cli_tool}"
VERBATIM)
# Install the symlink into the binary installation directory
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${cli_tool}"
DESTINATION ${CMAKE_INSTALL_BINDIR}
RENAME ${cli_tool})
endforeach()
# create manpage aliases
foreach(f lz4cat unlz4)
@@ -255,6 +339,9 @@ if(NOT LZ4_BUNDLED_MODE)
endif(UNIX AND LZ4_BUILD_CLI)
endif(NOT LZ4_BUNDLED_MODE)
#-----------------------------------------------------------------------------
# PKG-CONFIG - Generate and install pkg-config file
#-----------------------------------------------------------------------------
# pkg-config
set(PREFIX "${CMAKE_INSTALL_PREFIX}")
@@ -262,13 +349,13 @@ if("${CMAKE_INSTALL_FULL_LIBDIR}" STREQUAL "${CMAKE_INSTALL_PREFIX}/${CMAKE_INST
set(LIBDIR "\${prefix}/${CMAKE_INSTALL_LIBDIR}")
else()
set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
endif()
endif("${CMAKE_INSTALL_FULL_LIBDIR}" STREQUAL "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
if("${CMAKE_INSTALL_FULL_INCLUDEDIR}" STREQUAL "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
set(INCLUDEDIR "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
else()
set(INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
endif()
endif("${CMAKE_INSTALL_FULL_INCLUDEDIR}" STREQUAL "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
# for liblz4.pc substitution
set(VERSION ${LZ4_VERSION_STRING})
+9 -1
View File
@@ -1,2 +1,10 @@
@PACKAGE_INIT@
include( "${CMAKE_CURRENT_LIST_DIR}/lz4Targets.cmake" )
include( "${CMAKE_CURRENT_LIST_DIR}/lz4Targets.cmake" )
if(NOT TARGET lz4::lz4)
add_library(lz4::lz4 INTERFACE IMPORTED)
if("@BUILD_SHARED_LIBS@")
set_target_properties(lz4::lz4 PROPERTIES INTERFACE_LINK_LIBRARIES LZ4::lz4_shared)
else()
set_target_properties(lz4::lz4 PROPERTIES INTERFACE_LINK_LIBRARIES LZ4::lz4_static)
endif()
endif()
+69
View File
@@ -0,0 +1,69 @@
# multiconf.make
**multiconf.make** is a self-contained Makefile include that lets you build the **same targets under many different flag sets**—debug vs release, ASan vs UBSan, GCC vs Clang, etc.—without the usual “object-file soup.”
It hashes every combination of `CC/CXX`, `CFLAGS/CXXFLAGS`, `CPPFLAGS`, `LDFLAGS` and `LDLIBS` into a **dedicated cache directory**, so objects compiled with one configuration are never reused by another. Swap flags, rebuild, swap back—previous objects are still there and never collide.
---
## Key Benefits
| Why it matters | What multiconf.make does |
| --- | --- |
| **Isolated configs** | Stores objects into `cachedObjs/<hash>/`, one directory per unique flag set. |
| **Fast switching** | Reusing an old config is instant—link only, no recompilation. |
| **Header deps** | Edits to headers trigger only needed rebuilds. |
| **One-liner targets** | Macros (`c_program`, `cxx_program`, …) hide all rule boilerplate. |
| **Parallel-ready** | Safe with `make -j`, no duplicate compiles of shared sources. |
---
## Quick Start
### 1 · List your sources
```make
C_SRCDIRS := src src/cdeps # all .c are in these directories
CXX_SRCDIRS := src src/cxxdeps # all .cpp are in these directories
```
### 2 · Add and include
```make
# root/Makefile
include multiconf.make
```
### 3 · Declare targets
```make
app:
$(eval $(call c_program,app,app.o obj1.o obj2.o))
test:
$(eval $(call cxx_program,test, test.o objcxx1.o objcxx2.o))
```
### 4 · Build any config you like
```sh
# Release with GCC
make CFLAGS="-O3"
# Debug with Clang + AddressSanitizer (new cache dir)
make CC=clang CFLAGS="-g -O0 -fsanitize=address"
# Switch back to GCC release (objects still valid, relink only)
make CFLAGS="-O3"
```
Objects for each command live in different sub-folders; nothing overlaps.
---
## Additional capabilities
| Command | Description |
| --- | --- |
| `make clean_cache` | Wipe **all** cached objects & deps (full rebuild next time) |
| `V=1` | Show full compile/link commands |
---
+12 -2
View File
@@ -37,6 +37,15 @@ ifeq ($(TARGET_OS),)
TARGET_OS ?= $(OS)
endif
# Default to parallel builds for the top-level invocation unless a -j flag is
# already provided. Recursive makes inherit the jobserver from the parent.
ifeq ($(MAKELEVEL),0)
ifeq (,$(filter -j%,$(MAKEFLAGS)))
NPROC ?= $(shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
MAKEFLAGS += -j$(NPROC)
endif
endif
ifneq (,$(filter Windows%,$(TARGET_OS)))
LIBLZ4_NAME = liblz4-$(LIBVER_MAJOR)
LIBLZ4_EXP = liblz4.lib
@@ -66,6 +75,7 @@ endif
ifeq ($(WINBASED),yes)
EXT = .exe
WINDRES ?= windres
LDFLAGS += -Wl,--force-exe-suffix
endif
LIBLZ4 = $(LIBLZ4_NAME).$(SHARED_EXT_VER)
@@ -81,7 +91,7 @@ VOID := /dev/null
endif
endif
ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku MidnightBSD MINGW% CYGWIN% MSYS%,$(shell $(UNAME))))
ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku MidnightBSD MINGW% CYGWIN% MSYS% AIX,$(shell $(UNAME))))
POSIX_ENV = Yes
else
POSIX_ENV = No
@@ -110,4 +120,4 @@ endif
INSTALL_PROGRAM ?= $(INSTALL) -m 755
INSTALL_DATA ?= $(INSTALL) -m 644
INSTALL_DIR ?= $(INSTALL) -d -m 755
MAKE_DIR ?= $(INSTALL) -d -m 755
+258
View File
@@ -0,0 +1,258 @@
# ##########################################################################
# multiconf.make
# Copyright (C) Yann Collet
#
# GPL v2 License
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# ##########################################################################
# Provides c_program(_shared_o) and cxx_program(_shared_o) target generation macros
# Provides static_library and c_dynamic_library target generation macros
# Support recompilation of only impacted units when an associated *.h is updated.
# Provides V=1 / VERBOSE=1 support. V=2 is used for debugging purposes.
# Complement target clean: delete objects and binaries created by this script
# Requires:
# - C_SRCDIRS, CXX_SRCDIRS, ASM_SRCDIRS defined
# OR
# C_SRCS, CXX_SRCS and ASM_SRCS variables defined
# *and* vpath set to find all source files
# OR
# C_OBJS, CXX_OBJS and ASM_OBJS variables defined
# *and* vpath set to find all source files
# - directory `cachedObjs/` available to cache object files.
# alternatively: set CACHE_ROOT to some different value.
# Optional:
# - HASH can be set to a different custom hash program.
# *_program*: generates a recipe for a target that will be built in a cache directory.
# The cache directory is automatically derived from CACHE_ROOT and list of flags and compilers.
# *_shared_o* variants are optional optimization variants, that share the same objects across multiple targets.
# However, as a consequence, all these objects must have exactly the same list of flags,
# which in practice means that there must be no target-level modification (like: target: CFLAGS += someFlag).
# If unsure, only use the standard variants, c_program and cxx_program.
# All *_program* macro functions take up to 4 argument:
# - The name of the target
# - The list of object files to build in the cache directory
# - An optional list of dependencies for linking, that will not be built
# - An optional complementary recipe code, that will run after compilation and link
# Silent mode is default; use V = 1 or VERBOSE = 1 to see compilation lines
VERBOSE ?= $(V)
$(VERBOSE).SILENT:
# Directory where object files will be built
CACHE_ROOT ?= cachedObjs
# --------------------------------------------------------------------------------------------
# Dependency management
DEPFLAGS = -MT $@ -MMD -MP -MF
# Include dependency files
include $(wildcard $(CACHE_ROOT)/**/*.d)
include $(wildcard $(CACHE_ROOT)/generic/*/*.d)
# --------------------------------------------------------------------------------------------
# Automatic determination of build artifacts cache directory, keyed on build
# flags, so that we can do incremental, parallel builds of different binaries
# with different build flags without collisions.
UNAME ?= $(shell uname)
ifeq ($(UNAME), Darwin)
HASH ?= md5
else ifeq ($(UNAME), FreeBSD)
HASH ?= gmd5sum
else ifeq ($(UNAME), OpenBSD)
HASH ?= md5
endif
HASH ?= md5sum
HAVE_HASH := $(shell echo 1 | $(HASH) > /dev/null && echo 1 || echo 0)
ifeq ($(HAVE_HASH),0)
$(info warning : could not find HASH ($(HASH)), required to differentiate builds using different flags)
HASH_FUNC = generic/$(1)
else
HASH_FUNC = $(firstword $(shell echo $(2) | $(HASH) ))
endif
MKDIR ?= mkdir
LN ?= ln
# --------------------------------------------------------------------------------------------
# The following macros are used to create object files in the cache directory.
# The object files are named after the source file, but with a different path.
# Create build directories on-demand.
#
# For some reason, make treats the directory as an intermediate file and tries
# to delete it. So we work around that by marking it "precious". Solution found
# here:
# http://ismail.badawi.io/blog/2017/03/28/automatic-directory-creation-in-make/
.PRECIOUS: $(CACHE_ROOT)/%/.
$(CACHE_ROOT)/%/. :
$(MKDIR) -p $@
define addTargetAsmObject # targetName, addlDeps
$$(if $$(filter 2,$$(V)),$$(info $$(call $(0),$(1),$(2))))
.PRECIOUS: $$(CACHE_ROOT)/%/$(1)
$$(CACHE_ROOT)/%/$(1) : $(1:.o=.S) $(2) | $$(CACHE_ROOT)/%/.
@echo AS $$@
$$(CC) $$(CPPFLAGS) $$(CXXFLAGS) $$(DEPFLAGS) $$(CACHE_ROOT)/$$*/$(1:.o=.d) -c $$< -o $$@
endef # addTargetAsmObject
define addTargetCObject # targetName, addlDeps
$$(if $$(filter 2,$$(V)),$$(info $$(call $(0),$(1),$(2)))) #debug print
.PRECIOUS: $$(CACHE_ROOT)/%/$(1)
$$(CACHE_ROOT)/%/$(1) : $(1:.o=.c) $(2) | $$(CACHE_ROOT)/%/.
@echo CC $$@
$$(CC) $$(CPPFLAGS) $$(CFLAGS) $$(DEPFLAGS) $$(CACHE_ROOT)/$$*/$(1:.o=.d) -c $$< -o $$@
endef # addTargetCObject
define addTargetCxxObject # targetName, suffix, addlDeps
$$(if $$(filter 2,$$(V)),$$(info $$(call $(0),$(1),$(2),$(3))))
.PRECIOUS: $$(CACHE_ROOT)/%/$(1)
$$(CACHE_ROOT)/%/$(1) : $(1:.o=.$(2)) $(3) | $$(CACHE_ROOT)/%/.
@echo CXX $$@
$$(CXX) $$(CPPFLAGS) $$(CXXFLAGS) $$(DEPFLAGS) $$(CACHE_ROOT)/$$*/$(1:.o=.d) -c $$< -o $$@
endef # addTargetCxxObject
# Create targets for individual object files
C_SRCDIRS += .
vpath %.c $(C_SRCDIRS)
CXX_SRCDIRS += .
vpath %.cpp $(CXX_SRCDIRS)
vpath %.cc $(CXX_SRCDIRS)
ASM_SRCDIRS += .
vpath %.S $(ASM_SRCDIRS)
# If C_SRCDIRS, CXX_SRCDIRS and ASM_SRCDIRS are not defined, use C_SRCS, CXX_SRCS and ASM_SRCS
C_SRCS ?= $(notdir $(foreach dir,$(C_SRCDIRS),$(wildcard $(dir)/*.c)))
CPP_SRCS ?= $(notdir $(foreach dir,$(CXX_SRCDIRS),$(wildcard $(dir)/*.cpp)))
CC_SRCS ?= $(notdir $(foreach dir,$(CXX_SRCDIRS),$(wildcard $(dir)/*.cc)))
CXX_SRCS ?= $(CPP_SRCS) $(CC_SRCS)
ASM_SRCS ?= $(notdir $(foreach dir,$(ASM_SRCDIRS),$(wildcard $(dir)/*.S)))
# If C_SRCS, CXX_SRCS and ASM_SRCS are not defined, use C_OBJS, CXX_OBJS and ASM_OBJS
C_OBJS ?= $(patsubst %.c,%.o,$(C_SRCS))
CPP_OBJS ?= $(patsubst %.cpp,%.o,$(CPP_SRCS))
CC_OBJS ?= $(patsubst %.cc,%.o,$(CC_SRCS))
CXX_OBJS ?= $(CPP_OBJS) $(CC_OBJS) # Note: not used
ASM_OBJS ?= $(patsubst %.S,%.o,$(ASM_SRCS))
$(foreach OBJ,$(C_OBJS),$(eval $(call addTargetCObject,$(OBJ))))
$(foreach OBJ,$(CPP_OBJS),$(eval $(call addTargetCxxObject,$(OBJ),cpp)))
$(foreach OBJ,$(CC_OBJS),$(eval $(call addTargetCxxObject,$(OBJ),cc)))
$(foreach OBJ,$(ASM_OBJS),$(eval $(call addTargetAsmObject,$(OBJ))))
# --------------------------------------------------------------------------------------------
# The following macros are used to create targets in the user Makefile.
# Binaries are built in the cache directory, and then symlinked to the current directory.
# The cache directory is automatically derived from CACHE_ROOT and list of flags and compilers.
define static_library # targetName, targetDeps, addlDeps, addRecipe, hashComplement
$$(if $$(filter 2,$$(V)),$$(info $$(call $(0),$(1),$(2),$(3),$(4),$(5))))
MCM_ALL_BINS += $(1)
$$(CACHE_ROOT)/%/$(1) : $$(addprefix $$(CACHE_ROOT)/%/,$(2)) $(3)
@echo AR $$@
$$(AR) $$(ARFLAGS) $$@ $$^
$(4)
.PHONY: $(1)
$(1) : ARFLAGS = rcs
$(1) : $$(CACHE_ROOT)/$$(call HASH_FUNC,$(1),$(2) $$(CPPFLAGS) $$(CC) $$(CFLAGS) $$(CXX) $$(CXXFLAGS) $$(AR) $$(ARFLAGS) $(5))/$(1)
$$(LN) -sf $$< $$@
endef # static_library
define c_dynamic_library # targetName, targetDeps, addlDeps, addRecipe, hashComplement
$$(if $$(filter 2,$$(V)),$$(info $$(call $(0),$(1),$(2),$(3),$(4),$(5))))
MCM_ALL_BINS += $(1)
$$(CACHE_ROOT)/%/$(1) : $$(addprefix $$(CACHE_ROOT)/%/,$(2)) $(3)
@echo LD $$@
$$(CC) $$(CPPFLAGS) $$(CFLAGS) $$(LDFLAGS) -shared -o $$@ $$^ $$(LDLIBS)
$(4)
.PHONY: $(1)
$(1) : CFLAGS += -fPIC
$(1) : $$(CACHE_ROOT)/$$(call HASH_FUNC,$(1),$(2) $$(CPPFLAGS) $$(CC) $$(CFLAGS) $$(LDFLAGS) $$(LDLIBS) $(5))/$(1)
$$(LN) -sf $$< $$@
endef # c_dynamic_library
define program_base # targetName, targetDeps, addlDeps, addRecipe, hashComplement, compiler, flags
$$(if $$(filter 2,$$(V)),$$(info $$(call $(0),$(1),$(2),$(3),$(4),$(5),$(6),$(7))))
MCM_ALL_BINS += $(1)
$$(CACHE_ROOT)/%/$(1) : $$(addprefix $$(CACHE_ROOT)/%/,$(2)) $(3)
@echo LD $$@
$$($(6)) $$(CPPFLAGS) $$($(7)) $$^ -o $$@ $$(LDFLAGS) $$(LDLIBS)
$(4)
.PHONY: $(1)
$(1) : $$(CACHE_ROOT)/$$(call HASH_FUNC,$(1),$$($(6)) $$(CPPFLAGS) $$($(7)) $$(LDFLAGS) $$(LDLIBS) $(5))/$(1)
$$(LN) -sf $$< $$@$(EXT)
endef # program_base
# Note: $(EXT) must be set to .exe for Windows
define c_program # targetName, targetDeps, addlDeps, addRecipe
$$(eval $$(call program_base,$(1),$(2),$(3),$(4),$(1)$(2),CC,CFLAGS))
endef # c_program
define c_program_shared_o # targetName, targetDeps, addlDeps, addRecipe
$$(eval $$(call program_base,$(1),$(2),$(3),$(4),,CC,CFLAGS))
endef # c_program_shared_o
define cxx_program # targetName, targetDeps, addlDeps, addRecipe
$$(eval $$(call program_base,$(1),$(2),$(3),$(4),$(1)$(2),CXX,CXXFLAGS))
endef # cxx_program
define cxx_program_shared_o # targetName, targetDeps, addlDeps, addRecipe
$$(eval $$(call program_base,$(1),$(2),$(3),$(4),,CXX,CXXFLAGS))
endef # cxx_program_shared_o
# --------------------------------------------------------------------------------------------
# Cleaning: delete all objects and binaries created with this script
.PHONY: clean_cache
clean_cache:
$(RM) -rf $(CACHE_ROOT)
$(RM) $(MCM_ALL_BINS)
# automatically attach to standard clean target
.PHONY: clean
clean: clean_cache
+3 -3
View File
@@ -15,9 +15,9 @@ def find_version_tuple(filepath):
with open(filepath) as fd:
version_file_data = fd.read()
patterns = r"""#\s*define\s+LZ4_VERSION_MAJOR\s+([0-9]+).*$
#\s*define\s+LZ4_VERSION_MINOR\s+([0-9]+).*$
#\s*define\s+LZ4_VERSION_RELEASE\s+([0-9]+).*$
patterns = r"""\s*#\s*define\s+LZ4_VERSION_MAJOR\s+([0-9]+).*$
\s*#\s*define\s+LZ4_VERSION_MINOR\s+([0-9]+).*$
\s*#\s*define\s+LZ4_VERSION_RELEASE\s+([0-9]+).*$
"""
regex = re.compile(patterns, re.MULTILINE)
version_match = regex.search(version_file_data)
+1 -1
View File
@@ -10,7 +10,7 @@ This Meson build system is provided with no guarantee.
## How to build
`cd` to this meson directory (`contrib/meson`)
`cd` to this meson directory (`build/meson`)
```sh
meson setup --buildtype=release -Ddefault_library=shared -Dprograms=true builddir
-1
View File
@@ -16,7 +16,6 @@ project(
'c',
license: 'BSD-2-Clause-Patent AND GPL-2.0-or-later',
default_options: [
'c_std=c99',
'buildtype=release',
'warning_level=3'
],
+7 -7
View File
@@ -11,15 +11,15 @@
lz4_source_root = '../../../..'
examples = {
'printVersion': 'printVersion.c',
'doubleBuffer': 'blockStreaming_doubleBuffer.c',
'print_version': 'print_version.c',
'blockStreaming_doubleBuffer': 'blockStreaming_doubleBuffer.c',
'dictionaryRandomAccess': 'dictionaryRandomAccess.c',
'ringBuffer': 'blockStreaming_ringBuffer.c',
'ringBufferHC': 'HCStreaming_ringBuffer.c',
'lineCompress': 'blockStreaming_lineByLine.c',
'blockStreaming_ringBuffer': 'blockStreaming_ringBuffer.c',
'streamingHC_ringBuffer': 'streamingHC_ringBuffer.c',
'blockStreaming_lineByLine': 'blockStreaming_lineByLine.c',
'frameCompress': 'frameCompress.c',
'compressFunctions': 'compress_functions.c',
'simpleBuffer': 'simple_buffer.c',
'bench_functions': 'bench_functions.c',
'simple_buffer': 'simple_buffer.c',
}
foreach e, src : examples
+9
View File
@@ -81,6 +81,15 @@ if get_option('memory-usage') > 0
compile_args += '-DLZ4_MEMORY_USAGE=@0@'.format(get_option('memory-usage'))
endif
if get_option('endianness-independent-output')
if get_option('default_library') != 'static'
error('Endianness-independent output can only be enabled in static builds')
endif
add_project_arguments('-DLZ4_STATIC_LINKING_ONLY_ENDIANNESS_INDEPENDENT_OUTPUT')
compile_args += '-DLZ4_STATIC_LINKING_ONLY_ENDIANNESS_INDEPENDENT_OUTPUT'
endif
if get_option('unstable')
add_project_arguments('-DLZ4_STATIC_LINKING_ONLY', language: 'c')
compile_args += '-DLZ4_STATIC_LINKING_ONLY'
+2
View File
@@ -1,3 +1,5 @@
lz4_source_root = '../../../..'
fuzzers = [
'compress_frame_fuzzer',
'compress_fuzzer',
+23 -6
View File
@@ -10,18 +10,35 @@
lz4_source_root = '../../../..'
# note:
# it would be preferable to use some kind of glob or wildcard expansion here...
sources = files(
lz4_source_root / 'programs/bench.c',
lz4_source_root / 'programs/datagen.c',
lz4_source_root / 'programs/lorem.c',
lz4_source_root / 'programs/lz4cli.c',
lz4_source_root / 'programs/lz4io.c',
lz4_source_root / 'programs/util.c',
lz4_source_root / 'programs/threadpool.c',
lz4_source_root / 'programs/timefn.c',
)
# Initialize an empty list for extra dependencies
extra_deps = []
if get_option('enable_multithread')
pthread_dep = dependency('threads', required : true)
extra_deps += [pthread_dep]
multithread_args = ['-DLZ4IO_MULTITHREAD']
else
multithread_args = []
endif
lz4 = executable(
'lz4',
sources,
include_directories: include_directories(lz4_source_root / 'programs'),
dependencies: [liblz4_internal_dep],
dependencies: [liblz4_internal_dep] + extra_deps,
c_args: multithread_args,
export_dynamic: get_option('debug') and host_machine.system() == 'windows',
install: true
)
@@ -32,8 +49,8 @@ lz4cat = custom_target(
output: 'lz4cat',
command: [
'ln',
'--symbolic',
'--force',
'-s',
'-f',
fs.name(lz4.full_path()),
'@OUTPUT@'
]
@@ -45,8 +62,8 @@ unlz4 = custom_target(
output: 'unlz4',
command: [
'ln',
'--symbolic',
'--force',
'-s',
'-f',
fs.name(lz4.full_path()),
'@OUTPUT@'
]
+11 -4
View File
@@ -25,8 +25,12 @@ test_exes = {
'test': false,
},
'datagen': {
'sources': files(lz4_source_root / 'tests/datagencli.c'),
'objects': lz4.extract_objects(lz4_source_root / 'programs/datagen.c'),
'sources': files(
lz4_source_root / 'programs/lorem.c',
lz4_source_root / 'tests/datagencli.c',
lz4_source_root / 'tests/datagen.c',
lz4_source_root / 'tests/loremOut.c',
),
'include_directories': include_directories(lz4_source_root / 'programs'),
},
'decompress-partial-usingDict.c': {
@@ -36,14 +40,17 @@ test_exes = {
'sources': files(lz4_source_root / 'tests/decompress-partial.c'),
},
'frametest': {
'sources': files(lz4_source_root / 'tests/frametest.c'),
'sources': files(
lz4_source_root / 'tests/frametest.c',
lz4_source_root / 'lib/lz4file.c',
),
'include_directories': include_directories(lz4_source_root / 'programs'),
'args': ['-v', '-T@0@s'.format(fuzzer_time)],
'test': false,
},
'freestanding': {
'sources': files(lz4_source_root / 'tests/freestanding.c'),
'c_args': ['-ffreestanding', '-Wno-unused-parameter', '-Wno-declaration-after-statement'],
'c_args': ['-ffreestanding', '-fno-stack-protector', '-Wno-unused-parameter', '-Wno-declaration-after-statement', '-DLZ4_DEBUG=0'],
'link_args': ['-nostdlib'],
'build': cc.get_id() in ['gcc', 'clang'] and
host_machine.system() == 'linux' and host_machine.cpu_family() == 'x86_64',
+4
View File
@@ -8,6 +8,8 @@
# in the COPYING file in the root directory of this source tree).
# #############################################################################
option('enable_multithread', type: 'boolean', value: true,
description: 'Enable multi-threading support')
option('align-test', type: 'boolean', value: true,
description: 'See LZ4_ALIGN_TEST')
option('contrib', type: 'boolean', value: false,
@@ -18,6 +20,8 @@ option('disable-memory-allocation', type: 'boolean', value: false,
description: 'See LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION. Static builds only')
option('distance-max', type: 'integer', min: 0, max: 65535, value: 65535,
description: 'See LZ4_DISTANCE_MAX')
option('endianness-independent-output', type: 'boolean', value: false,
description: 'See LZ4_STATIC_LINKING_ONLY_ENDIANNESS_INDEPENDENT_OUTPUT. Static builds only')
option('examples', type: 'boolean', value: false,
description: 'Enable examples')
option('fast-dec-loop', type: 'feature', value: 'auto',
+5
View File
@@ -0,0 +1,5 @@
These scripts will generate Visual Studio Solutions for a selected set of supported versions of MS Visual.
For these scripts to work, both `cmake` and the relevant Visual Studio version must be locally installed on the system where the script is run.
If `cmake` is installed into a non-standard directory, or user wants to test a specific version of `cmake`, the target `cmake` directory can be provided via the environment variable `CMAKE_PATH`.
+55
View File
@@ -0,0 +1,55 @@
:: Requires 1 parameter == GENERATOR
@echo off
setlocal
:: Set path
set "BUILD_BASE_DIR=%~dp0" :: Use the directory where the script is located
set "CMAKELIST_DIR=..\..\cmake"
if "%~1"=="" (
echo No generator specified as first parameter
exit /b 1
)
set "GENERATOR=%~1"
:: Check if a user-defined CMAKE_PATH is set and prioritize it
if defined CMAKE_PATH (
set "CMAKE_EXECUTABLE=%CMAKE_PATH%\cmake.exe"
echo Using user-defined cmake at %CMAKE_PATH%
) else (
:: Attempt to find cmake in the system PATH
where cmake >nul 2>&1
if %ERRORLEVEL% neq 0 (
:: Use the default standard cmake installation directory if not found in PATH
set "CMAKE_PATH=C:\Program Files\CMake\bin"
echo CMake not in system PATH => using default CMAKE_PATH=%CMAKE_PATH%
set "CMAKE_EXECUTABLE=%CMAKE_PATH%\cmake.exe"
) else (
set "CMAKE_EXECUTABLE=cmake"
echo CMake found in system PATH.
)
)
:: Set the build directory to a subdirectory named after the generator
set "BUILD_DIR=%BUILD_BASE_DIR%\%GENERATOR%"
:: Create the build directory if it doesn't exist
if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
:: Run CMake to configure the project and generate the solution
pushd "%BUILD_DIR%"
"%CMAKE_EXECUTABLE%" -G "%GENERATOR%" "%CMAKELIST_DIR%"
if %ERRORLEVEL% neq 0 goto :error
:: If successful, end script
echo Build configuration successful for %GENERATOR%.
goto :end
:error
echo Failed to configure build for %GENERATOR%.
exit /b 1
:end
popd
endlocal
@echo on
+3
View File
@@ -0,0 +1,3 @@
@echo off
:: Call the central script with the specific generator for VS2015
call generate_solution.cmd "Visual Studio 14 2015"
+3
View File
@@ -0,0 +1,3 @@
@echo off
:: Call the central script with the specific generator for VS2017
call generate_solution.cmd "Visual Studio 15 2017"
+3
View File
@@ -0,0 +1,3 @@
@echo off
:: Call the central script with the specific generator for VS2019
call generate_solution.cmd "Visual Studio 16 2019"
+3
View File
@@ -0,0 +1,3 @@
@echo off
:: Call the central script with the specific generator for VS2022
call generate_solution.cmd "Visual Studio 17 2022"
-10
View File
@@ -1,10 +0,0 @@
liblz4 (1.7.2) unstable; urgency=low
* Changed : moved to versioning; package, cli and library have same version number
* Improved: Small decompression speed boost (+4%)
* Improved: Performance on ARMv6 and ARMv7
* Added : Debianization, by Evgeniy Polyakov
* Makefile: Generates object files (*.o) for faster (re)compilation on low power systems
* Fix : cli : crash on some invalid inputs
-- Yann Collet <Cyan4973@github.com> Sun, 28 Jun 2015 01:00:00 +0000
-1
View File
@@ -1 +0,0 @@
7
-23
View File
@@ -1,23 +0,0 @@
Source: liblz4
Section: devel
Priority: optional
Maintainer: Evgeniy Polyakov <zbr@ioremap.net>
Build-Depends:
cmake (>= 2.6),
debhelper (>= 7.0.50~),
cdbs
Standards-Version: 3.8.0
Homepage: http://www.lz4.org/
Vcs-Git: git://github.com/lz4/lz4.git
Vcs-Browser: https://github.com/lz4/lz4
Package: liblz4
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Extremely Fast Compression algorithm http://www.lz4.org
Package: liblz4-dev
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Extremely Fast Compression algorithm http://www.lz4.org
Development files.
-9
View File
@@ -1,9 +0,0 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: liblz4
Upstream-Contact: Yann Collet <Cyan4973@github.com>
Source: https://github.com/lz4/lz4
Files: *
Copyright: (C) 2011-2020 Yann Collet
License: GPL-2+
The full text of license: https://github.com/lz4/lz4/blob/dev/lib/LICENSE
-1
View File
@@ -1 +0,0 @@
usr/bin
View File
-2
View File
@@ -1,2 +0,0 @@
usr/include/lz4*
usr/lib/liblz4.so
-2
View File
@@ -1,2 +0,0 @@
usr/lib/liblz4.so.*
usr/bin/*
-7
View File
@@ -1,7 +0,0 @@
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk
DEB_CMAKE_EXTRA_FLAGS := -DCMAKE_BUILD_TYPE=RelWithDebInfo ../../build/cmake
+4 -4
View File
@@ -7,9 +7,9 @@ DESTDIR ?= /opt/local
# Version numbers
VERSION ?= 129
RELEASE ?= r$(VERSION)
LIBVER_MAJOR=$(shell sed -n '/define LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lib/lz4.h)
LIBVER_MINOR=$(shell sed -n '/define LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lib/lz4.h)
LIBVER_PATCH=$(shell sed -n '/define LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lib/lz4.h)
LIBVER_MAJOR=$(shell sed -n '/define[[:blank:]][[:blank:]]*LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lib/lz4.h)
LIBVER_MINOR=$(shell sed -n '/define[[:blank:]][[:blank:]]*LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lib/lz4.h)
LIBVER_PATCH=$(shell sed -n '/define[[:blank:]][[:blank:]]*LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lib/lz4.h)
LIBVER=$(LIBVER_MAJOR).$(LIBVER_MINOR).$(LIBVER_PATCH)
######################################################################
@@ -19,7 +19,7 @@ CC = $(CROSS)-gcc
AR = $(CROSS)-ar
LD = $(CROSS)-gcc
CFLAGS ?= -O3 -std=gnu99 -Wall -Wextra -Wundef -Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes -pedantic -DLZ4_VERSION=\"$(RELEASE)\"
CFLAGS ?= -O3 -std=gnu99 -Wall -Wextra -Wundef -Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes -Wpedantic -DLZ4_VERSION=\"$(RELEASE)\"
LDFLAGS ?= -s
SRC = programs/bench.c programs/lz4io.c programs/lz4cli.c
OBJ = $(SRC:.c=.o)
+3 -3
View File
@@ -39,9 +39,9 @@ LZ4API = ../../lib/lz4.h
LZ4MANUAL = ../../doc/lz4_manual.html
LZ4FAPI = ../../lib/lz4frame.h
LZ4FMANUAL = ../../doc/lz4frame_manual.html
LIBVER_MAJOR_SCRIPT:=`sed -n '/define LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < $(LZ4API)`
LIBVER_MINOR_SCRIPT:=`sed -n '/define LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < $(LZ4API)`
LIBVER_PATCH_SCRIPT:=`sed -n '/define LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < $(LZ4API)`
LIBVER_MAJOR_SCRIPT:=`sed -n '/define[[:blank:]][[:blank:]]*LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < $(LZ4API)`
LIBVER_MINOR_SCRIPT:=`sed -n '/define[[:blank:]][[:blank:]]*LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < $(LZ4API)`
LIBVER_PATCH_SCRIPT:=`sed -n '/define[[:blank:]][[:blank:]]*LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < $(LZ4API)`
LIBVER_SCRIPT:= $(LIBVER_MAJOR_SCRIPT).$(LIBVER_MINOR_SCRIPT).$(LIBVER_PATCH_SCRIPT)
LZ4VER := $(shell echo $(LIBVER_SCRIPT))
+3 -3
View File
@@ -1,8 +1,8 @@
#!/bin/sh
LIBVER_MAJOR_SCRIPT=`sed -n '/define LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/lz4.h`
LIBVER_MINOR_SCRIPT=`sed -n '/define LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/lz4.h`
LIBVER_PATCH_SCRIPT=`sed -n '/define LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/lz4.h`
LIBVER_MAJOR_SCRIPT=`sed -n '/define[[:blank:]][[:blank:]]*LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/lz4.h`
LIBVER_MINOR_SCRIPT=`sed -n '/define[[:blank:]][[:blank:]]*LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/lz4.h`
LIBVER_PATCH_SCRIPT=`sed -n '/define[[:blank:]][[:blank:]]*LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/lz4.h`
LIBVER_SCRIPT=$LIBVER_MAJOR_SCRIPT.$LIBVER_MINOR_SCRIPT.$LIBVER_PATCH_SCRIPT
echo LZ4_VERSION=$LIBVER_SCRIPT
+24 -18
View File
@@ -16,7 +16,7 @@ Distribution of this document is unlimited.
### Version
1.6.3 (12/09/2022)
1.6.4 (28/12/2023)
Introduction
@@ -219,24 +219,26 @@ It can be skipped by a decoder, or used to validate content correctness.
__Dictionary ID__
A dictionary is useful to compress short input sequences.
When present, the compressor can take advantage of dictionary's content
as a kind of “known prefix” to encode the input in a more compact manner.
When the frame descriptor defines independent blocks,
every block is initialized with the same dictionary.
If the frame descriptor defines linked blocks,
the dictionary is only used once, at the beginning of the frame.
The compressor and the decompressor must employ exactly the same dictionary for the data to be decodable.
The Dict-ID field is offered as a way to help the decoder determine
which dictionary must be used to correctly decode the compressed frame.
Dict-ID is only present if the associated flag is set.
It's an unsigned 32-bits value, stored using little-endian convention.
A dictionary is useful to compress short input sequences.
The compressor can take advantage of the dictionary context
to encode the input in a more compact manner.
It works as a kind of “known prefix” which is used by
both the compressor and the decompressor to “warm-up” reference tables.
Within a single frame, only a single Dict-ID field can be defined.
The decompressor can use Dict-ID identifier to determine
which dictionary must be used to correctly decode data.
The compressor and the decompressor must use exactly the same dictionary.
It's presumed that the 32-bits dictID uniquely identifies a dictionary.
Within a single frame, a single dictionary can be defined.
When the frame descriptor defines independent blocks,
each block will be initialized with the same dictionary.
If the frame descriptor defines linked blocks,
the dictionary will only be used once, at the beginning of the frame.
Note that the Dict-ID field is optional.
Knowledge of which dictionary to employ can also be passed off-band,
for example, it could be implied by the context of the application.
__Header Checksum__
@@ -356,7 +358,9 @@ Main characteristics of the legacy format :
- All blocks are always compressed, even when compression is detrimental.
- The last block is detected either because
it is followed by the “EOF” (End of File) mark,
or because it is followed by a known Frame Magic Number.
or because it is followed by a known Frame Magic Number.<br>
In the Linux Kernel implementation, it can also be detected because it
is followed by a sequence of four zero bytes.
- No checksum
- Convention is Little endian
@@ -397,6 +401,8 @@ and trigger an error if it does not fit within acceptable range.
Version changes
---------------
1.6.4 : minor clarifications for Dictionaries
1.6.3 : minor : clarify Data Block
1.6.2 : clarifies specification of _EndMark_
@@ -429,6 +435,6 @@ Version changes
0.6 : settled : stream size uses 8 bytes, endian convention is little endian
0.5: added copyright notice
0.5 : added copyright notice
0.4 : changed format to Google Doc compatible OpenDocument
+131 -59
View File
@@ -1,16 +1,16 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>1.9.4 Manual</title>
<title>1.10.0 Manual</title>
</head>
<body>
<h1>1.9.4 Manual</h1>
<h1>1.10.0 Manual</h1>
<hr>
<a name="Contents"></a><h2>Contents</h2>
<ol>
<li><a href="#Chapter1">Introduction</a></li>
<li><a href="#Chapter2">Version</a></li>
<li><a href="#Chapter3">Tuning parameter</a></li>
<li><a href="#Chapter3">Tuning memory usage</a></li>
<li><a href="#Chapter4">Simple Functions</a></li>
<li><a href="#Chapter5">Advanced Functions</a></li>
<li><a href="#Chapter6">Streaming Compression Functions</a></li>
@@ -83,15 +83,16 @@
</b></pre><BR>
<pre><b>const char* LZ4_versionString (void); </b>/**< library version string; useful to check dll version; requires v1.7.5+ */<b>
</b></pre><BR>
<a name="Chapter3"></a><h2>Tuning parameter</h2><pre></pre>
<a name="Chapter3"></a><h2>Tuning memory usage</h2><pre></pre>
<pre><b>#ifndef LZ4_MEMORY_USAGE
# define LZ4_MEMORY_USAGE LZ4_MEMORY_USAGE_DEFAULT
#endif
</b><p> Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; )
Increasing memory usage improves compression ratio, at the cost of speed.
</b><p> Can be selected at compile time, by setting LZ4_MEMORY_USAGE.
Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB)
Increasing memory usage improves compression ratio, generally at the cost of speed.
Reduced memory usage may improve speed at the cost of ratio, thanks to better cache locality.
Default value is 14, for 16KB, which nicely fits into Intel x86 L1 cache
Default value is 14, for 16KB, which nicely fits into most L1 caches.
</p></pre><BR>
@@ -114,8 +115,9 @@
</p></pre><BR>
<pre><b>int LZ4_decompress_safe (const char* src, char* dst, int compressedSize, int dstCapacity);
</b><p> compressedSize : is the exact complete size of the compressed block.
dstCapacity : is the size of destination buffer (which must be already allocated), presumed an upper bound of decompressed size.
</b><p> @compressedSize : is the exact complete size of the compressed block.
@dstCapacity : is the size of destination buffer (which must be already allocated),
presumed an upper bound of decompressed size.
@return : the number of bytes decompressed into destination buffer (necessarily <= dstCapacity)
If destination buffer is not large enough, decoding will stop and output an error code (negative value).
If the source stream is detected malformed, the function will stop decoding and return a negative result.
@@ -159,22 +161,25 @@ int LZ4_compress_fast_extState (void* state, const char* src, char* dst, int src
</p></pre><BR>
<pre><b>int LZ4_compress_destSize (const char* src, char* dst, int* srcSizePtr, int targetDstSize);
<pre><b>int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, int targetDstSize);
</b><p> Reverse the logic : compresses as much data as possible from 'src' buffer
into already allocated buffer 'dst', of size >= 'targetDestSize'.
into already allocated buffer 'dst', of size >= 'dstCapacity'.
This function either compresses the entire 'src' content into 'dst' if it's large enough,
or fill 'dst' buffer completely with as much data as possible from 'src'.
note: acceleration parameter is fixed to "default".
*srcSizePtr : will be modified to indicate how many bytes where read from 'src' to fill 'dst'.
*srcSizePtr : in+out parameter. Initially contains size of input.
Will be modified to indicate how many bytes where read from 'src' to fill 'dst'.
New value is necessarily <= input value.
@return : Nb bytes written into 'dst' (necessarily <= targetDestSize)
@return : Nb bytes written into 'dst' (necessarily <= dstCapacity)
or 0 if compression fails.
Note : from v1.8.2 to v1.9.1, this function had a bug (fixed un v1.9.2+):
the produced compressed content could, in specific circumstances,
require to be decompressed into a destination buffer larger
by at least 1 byte than the content to decompress.
Note : 'targetDstSize' must be >= 1, because it's the smallest valid lz4 payload.
Note 2:from v1.8.2 to v1.9.1, this function had a bug (fixed in v1.9.2+):
the produced compressed content could, in rare circumstances,
require to be decompressed into a destination buffer
larger by at least 1 byte than decompressesSize.
If an application uses `LZ4_compress_destSize()`,
it's highly recommended to update liblz4 to v1.9.2 or better.
If this can't be done or ensured,
@@ -222,6 +227,24 @@ int LZ4_compress_fast_extState (void* state, const char* src, char* dst, int src
<a name="Chapter6"></a><h2>Streaming Compression Functions</h2><pre></pre>
<pre><b>#if !defined(RC_INVOKED) </b>/* https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros */<b>
#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
LZ4_stream_t* LZ4_createStream(void);
int LZ4_freeStream (LZ4_stream_t* streamPtr);
#endif </b>/* !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) */<b>
#endif
</b><p>
- RC_INVOKED is predefined symbol of rc.exe (the resource compiler which is part of MSVC/Visual Studio).
https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros
- Since rc.exe is a legacy compiler, it truncates long symbol (> 30 chars)
and reports warning "RC4011: identifier truncated".
- To eliminate the warning, we surround long preprocessor symbol with
"#if !defined(RC_INVOKED) ... #endif" block that means
"skip this block when rc.exe is trying to read it".
</p></pre><BR>
<pre><b>void LZ4_resetStream_fast (LZ4_stream_t* streamPtr);
</b><p> Use this to prepare an LZ4_stream_t for a new chain of dependent blocks
(e.g., LZ4_compress_fast_continue()).
@@ -252,10 +275,55 @@ int LZ4_compress_fast_extState (void* state, const char* src, char* dst, int src
LZ4_loadDict() triggers a reset, so any previous data will be forgotten.
The same dictionary will have to be loaded on decompression side for successful decoding.
Dictionary are useful for better compression of small data (KB range).
While LZ4 accept any input as dictionary,
results are generally better when using Zstandard's Dictionary Builder.
While LZ4 itself accepts any input as dictionary, dictionary efficiency is also a topic.
When in doubt, employ the Zstandard's Dictionary Builder.
Loading a size of 0 is allowed, and is the same as reset.
@return : loaded dictionary size, in bytes (necessarily <= 64 KB)
@return : loaded dictionary size, in bytes (note: only the last 64 KB are loaded)
</p></pre><BR>
<pre><b>int LZ4_loadDictSlow(LZ4_stream_t* streamPtr, const char* dictionary, int dictSize);
</b><p> Same as LZ4_loadDict(),
but uses a bit more cpu to reference the dictionary content more thoroughly.
This is expected to slightly improve compression ratio.
The extra-cpu cost is likely worth it if the dictionary is re-used across multiple sessions.
@return : loaded dictionary size, in bytes (note: only the last 64 KB are loaded)
</p></pre><BR>
<pre><b>void
LZ4_attach_dictionary(LZ4_stream_t* workingStream,
const LZ4_stream_t* dictionaryStream);
</b><p>
This allows efficient re-use of a static dictionary multiple times.
Rather than re-loading the dictionary buffer into a working context before
each compression, or copying a pre-loaded dictionary's LZ4_stream_t into a
working LZ4_stream_t, this function introduces a no-copy setup mechanism,
in which the working stream references @dictionaryStream in-place.
Several assumptions are made about the state of @dictionaryStream.
Currently, only states which have been prepared by LZ4_loadDict() or
LZ4_loadDictSlow() should be expected to work.
Alternatively, the provided @dictionaryStream may be NULL,
in which case any existing dictionary stream is unset.
If a dictionary is provided, it replaces any pre-existing stream history.
The dictionary contents are the only history that can be referenced and
logically immediately precede the data compressed in the first subsequent
compression call.
The dictionary will only remain attached to the working stream through the
first compression call, at the end of which it is cleared.
@dictionaryStream stream (and source buffer) must remain in-place / accessible / unchanged
through the completion of the compression session.
Note: there is no equivalent LZ4_attach_*() method on the decompression side
because there is no initialization cost, hence no need to share the cost across multiple sessions.
To decompress LZ4 blocks using dictionary, attached or not,
just employ the regular LZ4_setStreamDecode() for streaming,
or the stateless LZ4_decompress_safe_usingDict() for one-shot decompression.
</p></pre><BR>
@@ -296,10 +364,12 @@ int LZ4_compress_fast_extState (void* state, const char* src, char* dst, int src
<a name="Chapter7"></a><h2>Streaming Decompression Functions</h2><pre> Bufferless synchronous API
<BR></pre>
<pre><b>#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
<pre><b>#if !defined(RC_INVOKED) </b>/* https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros */<b>
#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
LZ4_streamDecode_t* LZ4_createStreamDecode(void);
int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream);
#endif </b>/* !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) */<b>
#endif
</b><p> creation / destruction of streaming decompression tracking context.
A tracking context can be re-used multiple times.
@@ -332,10 +402,23 @@ int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream);
LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode,
const char* src, char* dst,
int srcSize, int dstCapacity);
</b><p> These decoding functions allow decompression of consecutive blocks in "streaming" mode.
A block is an unsplittable entity, it must be presented entirely to a decompression function.
Decompression functions only accepts one block at a time.
The last 64KB of previously decoded data *must* remain available and unmodified at the memory position where they were decoded.
</b><p> This decoding function allows decompression of consecutive blocks in "streaming" mode.
The difference with the usual independent blocks is that
new blocks are allowed to find references into former blocks.
A block is an unsplittable entity, and must be presented entirely to the decompression function.
LZ4_decompress_safe_continue() only accepts one block at a time.
It's modeled after `LZ4_decompress_safe()` and behaves similarly.
@LZ4_streamDecode : decompression state, tracking the position in memory of past data
@compressedSize : exact complete size of one compressed block.
@dstCapacity : size of destination buffer (which must be already allocated),
must be an upper bound of decompressed size.
@return : number of bytes decompressed into destination buffer (necessarily <= dstCapacity)
If destination buffer is not large enough, decoding will stop and output an error code (negative value).
If the source stream is detected malformed, the function will stop decoding and return a negative result.
The last 64KB of previously decoded data *must* remain available and unmodified
at the memory position where they were previously decoded.
If less than 64KB of data has been decoded, all the data must be present.
Special : if decompression side sets a ring buffer, it must respect one of the following conditions :
@@ -361,15 +444,27 @@ LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode,
LZ4_decompress_safe_usingDict(const char* src, char* dst,
int srcSize, int dstCapacity,
const char* dictStart, int dictSize);
</b><p> These decoding functions work the same as
a combination of LZ4_setStreamDecode() followed by LZ4_decompress_*_continue()
They are stand-alone, and don't need an LZ4_streamDecode_t structure.
</b><p> Works the same as
a combination of LZ4_setStreamDecode() followed by LZ4_decompress_safe_continue()
However, it's stateless: it doesn't need any LZ4_streamDecode_t state.
Dictionary is presumed stable : it must remain accessible and unmodified during decompression.
Performance tip : Decompression speed can be substantially increased
when dst == dictStart + dictSize.
</p></pre><BR>
<pre><b>int
LZ4_decompress_safe_partial_usingDict(const char* src, char* dst,
int compressedSize,
int targetOutputSize, int maxOutputSize,
const char* dictStart, int dictSize);
</b><p> Behaves the same as LZ4_decompress_safe_partial()
with the added ability to specify a memory segment for past data.
Performance tip : Decompression speed can be substantially increased
when dst == dictStart + dictSize.
</p></pre><BR>
<a name="Chapter8"></a><h2>Experimental section</h2><pre>
Symbols declared in this section must be considered unstable. Their
signatures or semantics may change, or they may be removed altogether in the
@@ -400,33 +495,9 @@ LZ4_decompress_safe_usingDict(const char* src, char* dst,
</p></pre><BR>
<pre><b>LZ4LIB_STATIC_API void
LZ4_attach_dictionary(LZ4_stream_t* workingStream,
const LZ4_stream_t* dictionaryStream);
</b><p> This is an experimental API that allows
efficient use of a static dictionary many times.
Rather than re-loading the dictionary buffer into a working context before
each compression, or copying a pre-loaded dictionary's LZ4_stream_t into a
working LZ4_stream_t, this function introduces a no-copy setup mechanism,
in which the working stream references the dictionary stream in-place.
Several assumptions are made about the state of the dictionary stream.
Currently, only streams which have been prepared by LZ4_loadDict() should
be expected to work.
Alternatively, the provided dictionaryStream may be NULL,
in which case any existing dictionary stream is unset.
If a dictionary is provided, it replaces any pre-existing stream history.
The dictionary contents are the only history that can be referenced and
logically immediately precede the data compressed in the first subsequent
compression call.
The dictionary will only remain attached to the working stream through the
first compression call, at the end of which it is cleared. The dictionary
stream (and source buffer) must remain in-place / accessible / unchanged
through the completion of the first compression call on the stream.
<pre><b>int LZ4_compress_destSize_extState(void* state, const char* src, char* dst, int* srcSizePtr, int targetDstSize, int acceleration);
</b><p> Same as LZ4_compress_destSize(), but using an externally allocated state.
Also: exposes @acceleration
</p></pre><BR>
@@ -496,7 +567,7 @@ LZ4_attach_dictionary(LZ4_stream_t* workingStream,
If you need static allocation, declare or allocate an LZ4_stream_t object.
</p></pre><BR>
<pre><b>LZ4_stream_t* LZ4_initStream (void* buffer, size_t size);
<pre><b>LZ4_stream_t* LZ4_initStream (void* stateBuffer, size_t size);
</b><p> An LZ4_stream_t structure must be initialized at least once.
This is automatically done when invoking LZ4_createStream(),
but it's not when the structure is simply declared on stack (for example).
@@ -568,11 +639,12 @@ LZ4_DEPRECATED("use LZ4_decompress_safe() instead") LZ4LIB_API int LZ4_uncompres
LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") LZ4LIB_API int LZ4_decompress_fast_withPrefix64k (const char* src, char* dst, int originalSize);
</b><p></p></pre><BR>
<pre><b>LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe() instead")
<pre><b>LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_partial() instead")
int LZ4_decompress_fast (const char* src, char* dst, int originalSize);
LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_continue() instead")
LZ4_DEPRECATED("This function is deprecated and unsafe. Consider migrating towards LZ4_decompress_safe_continue() instead. "
"Note that the contract will change (requires block's compressed size, instead of decompressed size)")
int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int originalSize);
LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_usingDict() instead")
LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_partial_usingDict() instead")
int LZ4_decompress_fast_usingDict (const char* src, char* dst, int originalSize, const char* dictStart, int dictSize);
</b><p> These functions used to be faster than LZ4_decompress_safe(),
but this is no longer the case. They are now slower.
+141 -82
View File
@@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>1.9.4 Manual</title>
<title>1.10.0 Manual</title>
</head>
<body>
<h1>1.9.4 Manual</h1>
<h1>1.10.0 Manual</h1>
<hr>
<a name="Contents"></a><h2>Contents</h2>
<ol>
@@ -18,7 +18,10 @@
<li><a href="#Chapter8">Compression</a></li>
<li><a href="#Chapter9">Decompression functions</a></li>
<li><a href="#Chapter10">Streaming decompression functions</a></li>
<li><a href="#Chapter11">Bulk processing dictionary API</a></li>
<li><a href="#Chapter11">Dictionary compression API</a></li>
<li><a href="#Chapter12">Bulk processing dictionary compression</a></li>
<li><a href="#Chapter13">Advanced compression operations</a></li>
<li><a href="#Chapter14">Custom memory allocation</a></li>
</ol>
<hr>
<a name="Chapter1"></a><h2>Introduction</h2><pre>
@@ -76,13 +79,13 @@
} LZ4F_frameType_t;
</b></pre><BR>
<pre><b>typedef struct {
LZ4F_blockSizeID_t blockSizeID; </b>/* max64KB, max256KB, max1MB, max4MB; 0 == default */<b>
LZ4F_blockMode_t blockMode; </b>/* LZ4F_blockLinked, LZ4F_blockIndependent; 0 == default */<b>
LZ4F_contentChecksum_t contentChecksumFlag; </b>/* 1: frame terminated with 32-bit checksum of decompressed data; 0: disabled (default) */<b>
LZ4F_blockSizeID_t blockSizeID; </b>/* max64KB, max256KB, max1MB, max4MB; 0 == default (LZ4F_max64KB) */<b>
LZ4F_blockMode_t blockMode; </b>/* LZ4F_blockLinked, LZ4F_blockIndependent; 0 == default (LZ4F_blockLinked) */<b>
LZ4F_contentChecksum_t contentChecksumFlag; </b>/* 1: add a 32-bit checksum of frame's decompressed data; 0 == default (disabled) */<b>
LZ4F_frameType_t frameType; </b>/* read-only field : LZ4F_frame or LZ4F_skippableFrame */<b>
unsigned long long contentSize; </b>/* Size of uncompressed content ; 0 == unknown */<b>
unsigned dictID; </b>/* Dictionary ID, sent by compressor to help decoder select correct dictionary; 0 == no dictID provided */<b>
LZ4F_blockChecksum_t blockChecksumFlag; </b>/* 1: each block followed by a checksum of block's compressed data; 0: disabled (default) */<b>
LZ4F_blockChecksum_t blockChecksumFlag; </b>/* 1: each block followed by a checksum of block's compressed data; 0 == default (disabled) */<b>
} LZ4F_frameInfo_t;
</b><p> makes it possible to set or read frame parameters.
Structure must be first init to 0, using memset() or LZ4F_INIT_FRAMEINFO,
@@ -105,6 +108,27 @@
<a name="Chapter5"></a><h2>Simple compression function</h2><pre></pre>
<pre><b>size_t LZ4F_compressFrame(void* dstBuffer, size_t dstCapacity,
const void* srcBuffer, size_t srcSize,
const LZ4F_preferences_t* preferencesPtr);
</b><p> Compress srcBuffer content into an LZ4-compressed frame.
It's a one shot operation, all input content is consumed, and all output is generated.
Note : it's a stateless operation (no LZ4F_cctx state needed).
In order to reduce load on the allocator, LZ4F_compressFrame(), by default,
uses the stack to allocate space for the compression state and some table.
If this usage of the stack is too much for your application,
consider compiling `lz4frame.c` with compile-time macro LZ4F_HEAPMODE set to 1 instead.
All state allocations will use the Heap.
It also means each invocation of LZ4F_compressFrame() will trigger several internal alloc/free invocations.
@dstCapacity MUST be >= LZ4F_compressFrameBound(srcSize, preferencesPtr).
@preferencesPtr is optional : one can provide NULL, in which case all preferences are set to default.
@return : number of bytes written into dstBuffer.
or an error code if it fails (can be tested using LZ4F_isError())
</p></pre><BR>
<pre><b>size_t LZ4F_compressFrameBound(size_t srcSize, const LZ4F_preferences_t* preferencesPtr);
</b><p> Returns the maximum possible compressed size with LZ4F_compressFrame() given srcSize and preferences.
`preferencesPtr` is optional. It can be replaced by NULL, in which case, the function will assume default preferences.
@@ -113,14 +137,8 @@
</p></pre><BR>
<pre><b>size_t LZ4F_compressFrame(void* dstBuffer, size_t dstCapacity,
const void* srcBuffer, size_t srcSize,
const LZ4F_preferences_t* preferencesPtr);
</b><p> Compress an entire srcBuffer into a valid LZ4 frame.
dstCapacity MUST be >= LZ4F_compressFrameBound(srcSize, preferencesPtr).
The LZ4F_preferences_t structure is optional : you can provide NULL as argument. All preferences will be set to default.
@return : number of bytes written into dstBuffer.
or an error code if it fails (can be tested using LZ4F_isError())
<pre><b>int LZ4F_compressionLevel_max(void); </b>/* v1.8.0+ */<b>
</b><p> @return maximum allowed compression level (currently: 12)
</p></pre><BR>
@@ -157,7 +175,7 @@ LZ4F_errorCode_t LZ4F_freeCompressionContext(LZ4F_cctx* cctx);
const LZ4F_preferences_t* prefsPtr);
</b><p> will write the frame header into dstBuffer.
dstCapacity must be >= LZ4F_HEADER_SIZE_MAX bytes.
`prefsPtr` is optional : you can provide NULL as argument, all preferences will then be set to default.
`prefsPtr` is optional : NULL can be provided to set all preferences to default.
@return : number of bytes written into dstBuffer for the header
or an error code (which can be tested using LZ4F_isError())
@@ -227,8 +245,9 @@ LZ4F_errorCode_t LZ4F_freeCompressionContext(LZ4F_cctx* cctx);
<a name="Chapter9"></a><h2>Decompression functions</h2><pre></pre>
<pre><b>typedef struct {
unsigned stableDst; /* pledges that last 64KB decompressed data will remain available unmodified between invocations.
* This optimization skips storage operations in tmp buffers. */
unsigned stableDst; /* pledges that last 64KB decompressed data is present right before @dstBuffer pointer.
* This optimization skips internal storage operations.
* Once set, this pledge must remain valid up to the end of current frame. */
unsigned skipChecksums; /* disable checksum calculation and verification, even when one is present in frame, to save CPU time.
* Setting this option to 1 once disables all checksums for the rest of the frame. */
unsigned reserved1; </b>/* must be set to zero for forward compatibility */<b>
@@ -329,6 +348,11 @@ LZ4F_decompress(LZ4F_dctx* dctx,
`dstBuffer` can freely change between each consecutive function invocation.
`dstBuffer` content will be overwritten.
Note: if `LZ4F_getFrameInfo()` is called before `LZ4F_decompress()`, srcBuffer must be updated to reflect
the number of bytes consumed after reading the frame header. Failure to update srcBuffer before calling
`LZ4F_decompress()` will cause decompression failure or, even worse, successful but incorrect decompression.
See the `LZ4F_getFrameInfo()` docs for details.
@return : an hint of how many `srcSize` bytes LZ4F_decompress() expects for next call.
Schematically, it's the size of the current (or remaining) compressed block + header of next block.
Respecting the hint provides some small speed benefit, because it skips intermediate buffers.
@@ -353,74 +377,28 @@ LZ4F_decompress(LZ4F_dctx* dctx,
and start a new one using same context resources.
</p></pre><BR>
<pre><b>typedef enum { LZ4F_LIST_ERRORS(LZ4F_GENERATE_ENUM)
_LZ4F_dummy_error_enum_for_c89_never_used } LZ4F_errorCodes;
</b></pre><BR>
<pre><b>LZ4FLIB_STATIC_API size_t LZ4F_getBlockSize(LZ4F_blockSizeID_t blockSizeID);
</b><p> Return, in scalar format (size_t),
the maximum block size associated with blockSizeID.
</p></pre><BR>
<a name="Chapter11"></a><h2>Dictionary compression API</h2><pre></pre>
<pre><b>LZ4FLIB_STATIC_API size_t
LZ4F_uncompressedUpdate(LZ4F_cctx* cctx,
void* dstBuffer, size_t dstCapacity,
const void* srcBuffer, size_t srcSize,
const LZ4F_compressOptions_t* cOptPtr);
</b><p> LZ4F_uncompressedUpdate() can be called repetitively to add as much data uncompressed data as necessary.
Important rule: dstCapacity MUST be large enough to store the entire source buffer as
no compression is done for this operation
If this condition is not respected, LZ4F_uncompressedUpdate() will fail (result is an errorCode).
After an error, the state is left in a UB state, and must be re-initialized or freed.
If previously a compressed block was written, buffered data is flushed
before appending uncompressed data is continued.
This is only supported when LZ4F_blockIndependent is used
`cOptPtr` is optional : NULL can be provided, in which case all options are set to default.
@return : number of bytes written into `dstBuffer` (it can be zero, meaning input data was just buffered).
or an error code if it fails (which can be tested using LZ4F_isError())
<pre><b>size_t
LZ4F_compressBegin_usingDict(LZ4F_cctx* cctx,
void* dstBuffer, size_t dstCapacity,
const void* dictBuffer, size_t dictSize,
const LZ4F_preferences_t* prefsPtr);
</b><p> Inits dictionary compression streaming, and writes the frame header into dstBuffer.
@dstCapacity must be >= LZ4F_HEADER_SIZE_MAX bytes.
@prefsPtr is optional : one may provide NULL as argument,
however, it's the only way to provide dictID in the frame header.
@dictBuffer must outlive the compression session.
@return : number of bytes written into dstBuffer for the header,
or an error code (which can be tested using LZ4F_isError())
NOTE: The LZ4Frame spec allows each independent block to be compressed with the dictionary,
but this entry supports a more limited scenario, where only the first block uses the dictionary.
This is still useful for small data, which only need one block anyway.
For larger inputs, one may be more interested in LZ4F_compressFrame_usingCDict() below.
</p></pre><BR>
<a name="Chapter11"></a><h2>Bulk processing dictionary API</h2><pre></pre>
<pre><b>LZ4FLIB_STATIC_API LZ4F_CDict* LZ4F_createCDict(const void* dictBuffer, size_t dictSize);
LZ4FLIB_STATIC_API void LZ4F_freeCDict(LZ4F_CDict* CDict);
</b><p> When compressing multiple messages / blocks using the same dictionary, it's recommended to load it just once.
LZ4_createCDict() will create a digested dictionary, ready to start future compression operations without startup delay.
LZ4_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only.
`dictBuffer` can be released after LZ4_CDict creation, since its content is copied within CDict
</p></pre><BR>
<pre><b>LZ4FLIB_STATIC_API size_t
LZ4F_compressFrame_usingCDict(LZ4F_cctx* cctx,
void* dst, size_t dstCapacity,
const void* src, size_t srcSize,
const LZ4F_CDict* cdict,
const LZ4F_preferences_t* preferencesPtr);
</b><p> Compress an entire srcBuffer into a valid LZ4 frame using a digested Dictionary.
cctx must point to a context created by LZ4F_createCompressionContext().
If cdict==NULL, compress without a dictionary.
dstBuffer MUST be >= LZ4F_compressFrameBound(srcSize, preferencesPtr).
If this condition is not respected, function will fail (@return an errorCode).
The LZ4F_preferences_t structure is optional : you may provide NULL as argument,
but it's not recommended, as it's the only way to provide dictID in the frame header.
@return : number of bytes written into dstBuffer.
or an error code if it fails (can be tested using LZ4F_isError())
</p></pre><BR>
<pre><b>LZ4FLIB_STATIC_API size_t
LZ4F_compressBegin_usingCDict(LZ4F_cctx* cctx,
void* dstBuffer, size_t dstCapacity,
const LZ4F_CDict* cdict,
const LZ4F_preferences_t* prefsPtr);
</b><p> Inits streaming dictionary compression, and writes the frame header into dstBuffer.
dstCapacity must be >= LZ4F_HEADER_SIZE_MAX bytes.
`prefsPtr` is optional : you may provide NULL as argument,
however, it's the only way to provide dictID in the frame header.
@return : number of bytes written into dstBuffer for the header,
or an error code (which can be tested using LZ4F_isError())
</p></pre><BR>
<pre><b>LZ4FLIB_STATIC_API size_t
<pre><b>size_t
LZ4F_decompress_usingDict(LZ4F_dctx* dctxPtr,
void* dstBuffer, size_t* dstSizePtr,
const void* srcBuffer, size_t* srcSizePtr,
@@ -431,6 +409,81 @@ LZ4F_decompress_usingDict(LZ4F_dctx* dctxPtr,
It must remain accessible throughout the entire frame decoding.
</p></pre><BR>
<a name="Chapter12"></a><h2>Bulk processing dictionary compression</h2><pre></pre>
<pre><b>LZ4F_CDict* LZ4F_createCDict(const void* dictBuffer, size_t dictSize);
void LZ4F_freeCDict(LZ4F_CDict* CDict);
</b><p> When compressing multiple messages / blocks using the same dictionary, it's recommended to initialize it just once.
LZ4_createCDict() will create a digested dictionary, ready to start future compression operations without startup delay.
LZ4_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only.
@dictBuffer can be released after LZ4_CDict creation, since its content is copied within CDict.
</p></pre><BR>
<pre><b>size_t
LZ4F_compressFrame_usingCDict(LZ4F_cctx* cctx,
void* dst, size_t dstCapacity,
const void* src, size_t srcSize,
const LZ4F_CDict* cdict,
const LZ4F_preferences_t* preferencesPtr);
</b><p> Compress an entire srcBuffer into a valid LZ4 frame using a digested Dictionary.
@cctx must point to a context created by LZ4F_createCompressionContext().
If @cdict==NULL, compress without a dictionary.
@dstBuffer MUST be >= LZ4F_compressFrameBound(srcSize, preferencesPtr).
If this condition is not respected, function will fail (@return an errorCode).
The LZ4F_preferences_t structure is optional : one may provide NULL as argument,
but it's not recommended, as it's the only way to provide @dictID in the frame header.
@return : number of bytes written into dstBuffer.
or an error code if it fails (can be tested using LZ4F_isError())
Note: for larger inputs generating multiple independent blocks,
this entry point uses the dictionary for each block.
</p></pre><BR>
<pre><b>size_t
LZ4F_compressBegin_usingCDict(LZ4F_cctx* cctx,
void* dstBuffer, size_t dstCapacity,
const LZ4F_CDict* cdict,
const LZ4F_preferences_t* prefsPtr);
</b><p> Inits streaming dictionary compression, and writes the frame header into dstBuffer.
@dstCapacity must be >= LZ4F_HEADER_SIZE_MAX bytes.
@prefsPtr is optional : one may provide NULL as argument,
note however that it's the only way to insert a @dictID in the frame header.
@cdict must outlive the compression session.
@return : number of bytes written into dstBuffer for the header,
or an error code, which can be tested using LZ4F_isError().
</p></pre><BR>
<pre><b>typedef enum { LZ4F_LIST_ERRORS(LZ4F_GENERATE_ENUM)
_LZ4F_dummy_error_enum_for_c89_never_used } LZ4F_errorCodes;
</b></pre><BR>
<a name="Chapter13"></a><h2>Advanced compression operations</h2><pre></pre>
<pre><b>LZ4FLIB_STATIC_API size_t LZ4F_getBlockSize(LZ4F_blockSizeID_t blockSizeID);
</b><p> @return, in scalar format (size_t),
the maximum block size associated with @blockSizeID,
or an error code (can be tested using LZ4F_isError()) if @blockSizeID is invalid.
</p></pre><BR>
<pre><b>LZ4FLIB_STATIC_API size_t
LZ4F_uncompressedUpdate(LZ4F_cctx* cctx,
void* dstBuffer, size_t dstCapacity,
const void* srcBuffer, size_t srcSize,
const LZ4F_compressOptions_t* cOptPtr);
</b><p> LZ4F_uncompressedUpdate() can be called repetitively to add data stored as uncompressed blocks.
Important rule: dstCapacity MUST be large enough to store the entire source buffer as
no compression is done for this operation
If this condition is not respected, LZ4F_uncompressedUpdate() will fail (result is an errorCode).
After an error, the state is left in a UB state, and must be re-initialized or freed.
If previously a compressed block was written, buffered data is flushed first,
before appending uncompressed data is continued.
This operation is only supported when LZ4F_blockIndependent is used.
`cOptPtr` is optional : NULL can be provided, in which case all options are set to default.
@return : number of bytes written into `dstBuffer` (it can be zero, meaning input data was just buffered).
or an error code if it fails (which can be tested using LZ4F_isError())
</p></pre><BR>
<a name="Chapter14"></a><h2>Custom memory allocation</h2><pre></pre>
<pre><b>typedef void* (*LZ4F_AllocFunction) (void* opaqueState, size_t size);
typedef void* (*LZ4F_CallocFunction) (void* opaqueState, size_t size);
typedef void (*LZ4F_FreeFunction) (void* opaqueState, void* address);
@@ -451,5 +504,11 @@ LZ4F_CustomMem const LZ4F_defaultCMem = { NULL, NULL, NULL, NULL }; </b>/**< th
</p></pre><BR>
<pre><b>LZ4FLIB_STATIC_API size_t LZ4F_cctx_size(const LZ4F_cctx* cctx);
LZ4FLIB_STATIC_API size_t LZ4F_dctx_size(const LZ4F_dctx* dctx);
</b><p> These functions return the total memory footprint of the provided context.
</p></pre><BR>
</html>
</body>
+9 -7
View File
@@ -1,11 +1,13 @@
/Makefile.lz4*
/printVersion
/doubleBuffer
/dictionaryRandomAccess
/ringBuffer
/ringBufferHC
/lineCompress
/print_version
/simple_buffer
/frameCompress
/fileCompress
/simpleBuffer
/blockStreaming_doubleBuffer
/blockStreaming_ringBuffer
/streamingHC_ringBuffer
/blockStreaming_lineByLine
/dictionaryRandomAccess
/bench_functions
/*.exe
/*.lz4s*
+51 -307
View File
@@ -1,339 +1,83 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Full name:
GNU General Public License v2.0 or later
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Short identifier:
GPL-2.0-or-later
Preamble
Text:
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
Preamble
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
The precise terms and conditions for copying, distribution and
modification follow.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
The precise terms and conditions for copying, distribution and modification follow.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+45 -55
View File
@@ -27,88 +27,78 @@
# kindly provided by Takayuki Matsuoka
# ##########################################################################
CPPFLAGS += -I../lib
CFLAGS ?= -O3
CFLAGS += -std=gnu99 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wstrict-prototypes
FLAGS := $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MOREFLAGS)
LIBDIR := ../lib
TESTFILE = Makefile
LZ4DIR := ../lib
LZ4 = ../programs/lz4
CPPFLAGS += -I$(LIBDIR)
USERCFLAGS:= $(CFLAGS)
WFLAGS = -std=gnu99 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wc++-compat
CFLAGS = $(WFLAGS) -O2 $(USERCFLAGS)
include ../Makefile.inc
TESTFILE = Makefile
TESTFILE_SMALL= .gitignore
LZ4DIR = ../programs
LZ4 = $(LZ4DIR)/lz4
LIBLZ4DIR = ../lib
LIBLZ4SRCS = $(notdir $(wildcard $(LIBLZ4DIR)/*.c))
LIBLZ4OBJS = $(LIBLZ4SRCS:.c=.o)
SLIBLZ4 := liblz4.a
default: all
all: printVersion doubleBuffer dictionaryRandomAccess ringBuffer ringBufferHC \
lineCompress frameCompress fileCompress simpleBuffer
C_SRCDIRS = . ../lib
include ../build/make/multiconf.make
$(LZ4DIR)/liblz4.a: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c $(LZ4DIR)/lz4frame.c $(LZ4DIR)/lz4.h $(LZ4DIR)/lz4hc.h $(LZ4DIR)/lz4frame.h $(LZ4DIR)/lz4frame_static.h
$(MAKE) -C $(LZ4DIR) liblz4.a
$(SLIBLZ4):
$(eval $(call static_library,$(SLIBLZ4), $(LIBLZ4OBJS)))
printVersion: printVersion.c $(LZ4DIR)/liblz4.a
$(CC) $(FLAGS) $^ -o $@$(EXT)
ALL = print_version \
simple_buffer \
frameCompress \
fileCompress \
blockStreaming_doubleBuffer \
blockStreaming_ringBuffer \
streamingHC_ringBuffer \
blockStreaming_lineByLine \
dictionaryRandomAccess \
bench_functions
doubleBuffer: blockStreaming_doubleBuffer.c $(LZ4DIR)/liblz4.a
$(CC) $(FLAGS) $^ -o $@$(EXT)
.PHONY: all
all: $(ALL)
dictionaryRandomAccess: dictionaryRandomAccess.c $(LZ4DIR)/liblz4.a
$(CC) $(FLAGS) $^ -o $@$(EXT)
ringBuffer : blockStreaming_ringBuffer.c $(LZ4DIR)/liblz4.a
$(CC) $(FLAGS) $^ -o $@$(EXT)
ringBufferHC: HCStreaming_ringBuffer.c $(LZ4DIR)/liblz4.a
$(CC) $(FLAGS) $^ -o $@$(EXT)
lineCompress: blockStreaming_lineByLine.c $(LZ4DIR)/liblz4.a
$(CC) $(FLAGS) $^ -o $@$(EXT)
frameCompress: frameCompress.c $(LZ4DIR)/liblz4.a
$(CC) $(FLAGS) $^ -o $@$(EXT)
fileCompress: fileCompress.c $(LZ4DIR)/liblz4.a
$(CC) $(FLAGS) $^ -o $@$(EXT)
compressFunctions: compress_functions.c $(LZ4DIR)/liblz4.a
$(CC) $(FLAGS) $^ -o $@$(EXT) -lrt
simpleBuffer: simple_buffer.c $(LZ4DIR)/liblz4.a
$(CC) $(FLAGS) $^ -o $@$(EXT)
$(ALL): $(SLIBLZ4)
.PHONY:$(LZ4)
$(LZ4): MAKEFLAGS=
$(LZ4) :
$(MAKE) -C ../programs lz4
$(MAKE) -C $(LZ4DIR) lz4
.PHONY: test
test : all $(LZ4)
@echo "\n=== Print Version ==="
./printVersion$(EXT)
./print_version$(EXT)
@echo "\n=== Simple compression example ==="
./simpleBuffer$(EXT)
./simple_buffer$(EXT)
@echo "\n=== Double-buffer ==="
./doubleBuffer$(EXT) $(TESTFILE)
./blockStreaming_doubleBuffer$(EXT) $(TESTFILE)
@echo "\n=== Ring Buffer ==="
./ringBuffer$(EXT) $(TESTFILE)
./blockStreaming_ringBuffer$(EXT) $(TESTFILE)
@echo "\n=== Ring Buffer + LZ4 HC ==="
./ringBufferHC$(EXT) $(TESTFILE)
./streamingHC_ringBuffer$(EXT) $(TESTFILE)
@echo "\n=== Compress line by line ==="
./lineCompress$(EXT) $(TESTFILE)
./blockStreaming_lineByLine$(EXT) $(TESTFILE)
@echo "\n=== Dictionary Random Access ==="
./dictionaryRandomAccess$(EXT) $(TESTFILE) $(TESTFILE) 1100 1400
./dictionaryRandomAccess$(EXT) $(TESTFILE_SMALL) $(TESTFILE_SMALL) 0 32
@echo "\n=== Frame compression ==="
./frameCompress$(EXT) $(TESTFILE)
$(LZ4) -vt $(TESTFILE).lz4
@echo "\n=== file compression ==="
./fileCompress$(EXT) $(TESTFILE)
$(LZ4) -vt $(TESTFILE).lz4
@echo "\n=== Q&D benchmark ==="
./bench_functions$(EXT) 10000
.PHONY: cxxtest
cxxtest: CFLAGS := -O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror
cxxtest: clean
CC=$(CXX) $(MAKE) -C . all CFLAGS="$(CFLAGS)"
.PHONY: clean
clean:
@rm -f core *.o *.dec *-0 *-9 *-8192 *.lz4s *.lz4 \
printVersion$(EXT) doubleBuffer$(EXT) dictionaryRandomAccess$(EXT) \
ringBuffer$(EXT) ringBufferHC$(EXT) lineCompress$(EXT) frameCompress$(EXT) \
fileCompress$(EXT) compressFunctions$(EXT) simpleBuffer$(EXT)
@$(RM) core *.o *.dec *-0 *-9 *-8192 *.lz4s *.lz4 $(ALL)
@echo Cleaning completed
@@ -1,5 +1,5 @@
/*
* compress_functions.c
* bench_functions.c
* Copyright : Kyle Harper
* License : Follows same licensing as the lz4.c/lz4.h program at any given time. Currently, BSD 2.
* Description: A program to demonstrate the various compression functions involved in when using LZ4_compress_default(). The idea
@@ -67,8 +67,10 @@
#include <string.h> /* for atoi() memcmp() */
#include <stdint.h> /* for uint_types */
#include <inttypes.h> /* for PRIu64 */
#include <time.h> /* for clock_gettime() */
#include <time.h> /* for clock() */
#include <locale.h> /* for setlocale() */
#include <limits.h> /* for INT_MAX */
#include <assert.h>
/* We need to know what one billion is for clock timing. */
#define BILLION 1000000000L
@@ -82,46 +84,45 @@
#define ID__LZ4_DECOMPRESS_FAST 6
/*
* Easy show-error-and-bail function.
*/
void run_screaming(const char *message, const int code) {
printf("%s\n", message);
printf("%s \n", message);
exit(code);
}
/*
* Centralize the usage function to keep main cleaner.
*/
void usage(const char *message) {
printf("Usage: ./argPerformanceTesting <iterations>\n");
void usage(const char* exeName, const char* message) {
printf("Usage: %s <iterations> \n", exeName);
run_screaming(message, 1);
return;
}
#define CHECK(c) { if (!(c)) { run_screaming(#c, 1); } }
/*
* Runs the benchmark for LZ4_compress_* based on function_id.
* Runs the benchmark for LZ4_* function based on function_id.
* @return : benchmark duration, in ns
*/
uint64_t bench(
const char *known_good_dst,
const int function_id,
const int iterations,
int iterations,
const char *src,
char *dst,
const size_t src_size,
const size_t max_dst_size,
const size_t comp_size
) {
uint64_t time_taken = 0;
int rv = 0;
const int warm_up = 5000;
struct timespec start, end;
const int acceleration = 1;
LZ4_stream_t state;
clock_t start = clock();
// Select the right function to perform the benchmark on. We perform 5000 initial loops to warm the cache and ensure that dst
// remains matching to known_good_dst between successive calls.
@@ -129,40 +130,40 @@ uint64_t bench(
case ID__LZ4_COMPRESS_DEFAULT:
printf("Starting benchmark for function: LZ4_compress_default()\n");
for(int junk=0; junk<warm_up; junk++)
rv = LZ4_compress_default(src, dst, src_size, max_dst_size);
rv = LZ4_compress_default(src, dst, (int)src_size, (int)max_dst_size);
if (rv < 1)
run_screaming("Couldn't run LZ4_compress_default()... error code received is in exit code.", rv);
if (memcmp(known_good_dst, dst, max_dst_size) != 0)
run_screaming("According to memcmp(), the compressed dst we got doesn't match the known_good_dst... ruh roh.", 1);
clock_gettime(CLOCK_MONOTONIC, &start);
start = clock();
for (int i=1; i<=iterations; i++)
LZ4_compress_default(src, dst, src_size, max_dst_size);
LZ4_compress_default(src, dst, (int)src_size, (int)max_dst_size);
break;
case ID__LZ4_COMPRESS_FAST:
printf("Starting benchmark for function: LZ4_compress_fast()\n");
for(int junk=0; junk<warm_up; junk++)
rv = LZ4_compress_fast(src, dst, src_size, max_dst_size, acceleration);
rv = LZ4_compress_fast(src, dst, (int)src_size, (int)max_dst_size, acceleration);
if (rv < 1)
run_screaming("Couldn't run LZ4_compress_fast()... error code received is in exit code.", rv);
if (memcmp(known_good_dst, dst, max_dst_size) != 0)
run_screaming("According to memcmp(), the compressed dst we got doesn't match the known_good_dst... ruh roh.", 1);
clock_gettime(CLOCK_MONOTONIC, &start);
start = clock();
for (int i=1; i<=iterations; i++)
LZ4_compress_fast(src, dst, src_size, max_dst_size, acceleration);
LZ4_compress_fast(src, dst, (int)src_size, (int)max_dst_size, acceleration);
break;
case ID__LZ4_COMPRESS_FAST_EXTSTATE:
printf("Starting benchmark for function: LZ4_compress_fast_extState()\n");
for(int junk=0; junk<warm_up; junk++)
rv = LZ4_compress_fast_extState(&state, src, dst, src_size, max_dst_size, acceleration);
rv = LZ4_compress_fast_extState(&state, src, dst, (int)src_size, (int)max_dst_size, acceleration);
if (rv < 1)
run_screaming("Couldn't run LZ4_compress_fast_extState()... error code received is in exit code.", rv);
if (memcmp(known_good_dst, dst, max_dst_size) != 0)
run_screaming("According to memcmp(), the compressed dst we got doesn't match the known_good_dst... ruh roh.", 1);
clock_gettime(CLOCK_MONOTONIC, &start);
start = clock();
for (int i=1; i<=iterations; i++)
LZ4_compress_fast_extState(&state, src, dst, src_size, max_dst_size, acceleration);
LZ4_compress_fast_extState(&state, src, dst, (int)src_size, (int)max_dst_size, acceleration);
break;
// Disabled until LZ4_compress_generic() is exposed in the header.
@@ -188,27 +189,27 @@ uint64_t bench(
case ID__LZ4_DECOMPRESS_SAFE:
printf("Starting benchmark for function: LZ4_decompress_safe()\n");
for(int junk=0; junk<warm_up; junk++)
rv = LZ4_decompress_safe(src, dst, comp_size, src_size);
rv = LZ4_decompress_safe(src, dst, (int)comp_size, (int)src_size);
if (rv < 1)
run_screaming("Couldn't run LZ4_decompress_safe()... error code received is in exit code.", rv);
if (memcmp(known_good_dst, dst, src_size) != 0)
run_screaming("According to memcmp(), the compressed dst we got doesn't match the known_good_dst... ruh roh.", 1);
clock_gettime(CLOCK_MONOTONIC, &start);
start = clock();
for (int i=1; i<=iterations; i++)
LZ4_decompress_safe(src, dst, comp_size, src_size);
LZ4_decompress_safe(src, dst, (int)comp_size, (int)src_size);
break;
case ID__LZ4_DECOMPRESS_FAST:
printf("Starting benchmark for function: LZ4_decompress_fast()\n");
for(int junk=0; junk<warm_up; junk++)
rv = LZ4_decompress_fast(src, dst, src_size);
rv = LZ4_decompress_fast(src, dst, (int)src_size);
if (rv < 1)
run_screaming("Couldn't run LZ4_decompress_fast()... error code received is in exit code.", rv);
if (memcmp(known_good_dst, dst, src_size) != 0)
run_screaming("According to memcmp(), the compressed dst we got doesn't match the known_good_dst... ruh roh.", 1);
clock_gettime(CLOCK_MONOTONIC, &start);
start = clock();
for (int i=1; i<=iterations; i++)
LZ4_decompress_fast(src, dst, src_size);
LZ4_decompress_fast(src, dst, (int)src_size);
break;
default:
@@ -216,15 +217,21 @@ uint64_t bench(
break;
}
// Stop timer and return time taken.
clock_gettime(CLOCK_MONOTONIC, &end);
time_taken = BILLION *(end.tv_sec - start.tv_sec) + end.tv_nsec - start.tv_nsec;
{ clock_t end = clock();
return time_taken;
// Low resolution timer => requires more iterations to measure something
if (end == start) {
assert(iterations < (INT_MAX / 10));
iterations *= 10;
printf("not enough iterations => increase nb of iterations to %i \n", iterations);
return bench(known_good_dst, function_id, iterations, src, dst, src_size, max_dst_size, comp_size);
}
return (uint64_t)((double)(end - start) / CLOCKS_PER_SEC * BILLION);
}
}
/*
* main()
* We will demonstrate the use of each function for simplicity sake. Then we will run 2 suites of benchmarking:
@@ -235,32 +242,33 @@ uint64_t bench(
*/
int main(int argc, char **argv) {
// Get and verify options. There's really only 1: How many iterations to run.
const char* exeName = argv[0];
int iterations = 1000000;
if (argc > 1)
iterations = atoi(argv[1]);
if (iterations < 1)
usage("Argument 1 (iterations) must be > 0.");
usage(exeName, "Argument 1 (iterations) must be > 0.");
// First we will create 2 sources (char *) of 2000 bytes each. One normal text, the other highly-compressible text.
const char *src = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed luctus purus et risus vulputate, et mollis orci ullamcorper. Nulla facilisi. Fusce in ligula sed purus varius aliquet interdum vitae justo. Proin quis diam velit. Nulla varius iaculis auctor. Cras volutpat, justo eu dictum pulvinar, elit sem porttitor metus, et imperdiet metus sapien et ante. Nullam nisi nulla, ornare eu tristique eu, dignissim vitae diam. Nulla sagittis porta libero, a accumsan felis sagittis scelerisque. Integer laoreet eleifend congue. Etiam rhoncus leo vel dolor fermentum, quis luctus nisl iaculis. Praesent a erat sapien. Aliquam semper mi in lorem ultrices ultricies. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In feugiat risus sed enim ultrices, at sodales nulla tristique. Maecenas eget pellentesque justo, sed pellentesque lectus. Fusce sagittis sit amet elit vel varius. Donec sed ligula nec ligula vulputate rutrum sed ut lectus. Etiam congue pharetra leo vitae cursus. Morbi enim ante, porttitor ut varius vel, tincidunt quis justo. Nunc iaculis, risus id ultrices semper, metus est efficitur ligula, vel posuere risus nunc eget purus. Ut lorem turpis, condimentum at sem sed, porta aliquam turpis. In ut sapien a nulla dictum tincidunt quis sit amet lorem. Fusce at est egestas, luctus neque eu, consectetur tortor. Phasellus eleifend ultricies nulla ac lobortis. Morbi maximus quam cursus vehicula iaculis. Maecenas cursus vel justo ut rutrum. Curabitur magna orci, dignissim eget dapibus vitae, finibus id lacus. Praesent rhoncus mattis augue vitae bibendum. Praesent porta mauris non ultrices fermentum. Quisque vulputate ipsum in sodales pulvinar. Aliquam nec mollis felis. Donec vitae augue pulvinar, congue nisl sed, pretium purus. Fusce lobortis mi ac neque scelerisque semper. Pellentesque vel est vitae magna aliquet aliquet. Nam non dolor. Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Morbi ac lacinia felis metus.";
const char *hc_src = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
const char src[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed luctus purus et risus vulputate, et mollis orci ullamcorper. Nulla facilisi. Fusce in ligula sed purus varius aliquet interdum vitae justo. Proin quis diam velit. Nulla varius iaculis auctor. Cras volutpat, justo eu dictum pulvinar, elit sem porttitor metus, et imperdiet metus sapien et ante. Nullam nisi nulla, ornare eu tristique eu, dignissim vitae diam. Nulla sagittis porta libero, a accumsan felis sagittis scelerisque. Integer laoreet eleifend congue. Etiam rhoncus leo vel dolor fermentum, quis luctus nisl iaculis. Praesent a erat sapien. Aliquam semper mi in lorem ultrices ultricies. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In feugiat risus sed enim ultrices, at sodales nulla tristique. Maecenas eget pellentesque justo, sed pellentesque lectus. Fusce sagittis sit amet elit vel varius. Donec sed ligula nec ligula vulputate rutrum sed ut lectus. Etiam congue pharetra leo vitae cursus. Morbi enim ante, porttitor ut varius vel, tincidunt quis justo. Nunc iaculis, risus id ultrices semper, metus est efficitur ligula, vel posuere risus nunc eget purus. Ut lorem turpis, condimentum at sem sed, porta aliquam turpis. In ut sapien a nulla dictum tincidunt quis sit amet lorem. Fusce at est egestas, luctus neque eu, consectetur tortor. Phasellus eleifend ultricies nulla ac lobortis. Morbi maximus quam cursus vehicula iaculis. Maecenas cursus vel justo ut rutrum. Curabitur magna orci, dignissim eget dapibus vitae, finibus id lacus. Praesent rhoncus mattis augue vitae bibendum. Praesent porta mauris non ultrices fermentum. Quisque vulputate ipsum in sodales pulvinar. Aliquam nec mollis felis. Donec vitae augue pulvinar, congue nisl sed, pretium purus. Fusce lobortis mi ac neque scelerisque semper. Pellentesque vel est vitae magna aliquet aliquet. Nam non dolor. Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Morbi ac lacinia felis metus.";
const char hc_src[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
// Set and derive sizes. Since we're using strings, use strlen() + 1 for \0.
const size_t src_size = strlen(src) + 1;
const size_t max_dst_size = LZ4_compressBound(src_size);
const size_t max_dst_size = (size_t)LZ4_compressBound((int)src_size);
int bytes_returned = 0;
// Now build allocations for the data we'll be playing with.
char *dst = calloc(1, max_dst_size);
char *known_good_dst = calloc(1, max_dst_size);
char *known_good_hc_dst = calloc(1, max_dst_size);
char *dst = (char*)calloc(1, max_dst_size);
char *known_good_dst = (char*)calloc(1, max_dst_size);
char *known_good_hc_dst = (char*)calloc(1, max_dst_size);
if (dst == NULL || known_good_dst == NULL || known_good_hc_dst == NULL)
run_screaming("Couldn't allocate memory for the destination buffers. Sad :(", 1);
// Create known-good buffers to verify our tests with other functions will produce the same results.
bytes_returned = LZ4_compress_default(src, known_good_dst, src_size, max_dst_size);
bytes_returned = LZ4_compress_default(src, known_good_dst, (int)src_size, (int)max_dst_size);
if (bytes_returned < 1)
run_screaming("Couldn't create a known-good destination buffer for comparison... this is bad.", 1);
const size_t src_comp_size = bytes_returned;
bytes_returned = LZ4_compress_default(hc_src, known_good_hc_dst, src_size, max_dst_size);
bytes_returned = LZ4_compress_default(hc_src, known_good_hc_dst, (int)src_size, (int)max_dst_size);
if (bytes_returned < 1)
run_screaming("Couldn't create a known-good (highly compressible) destination buffer for comparison... this is bad.", 1);
const size_t hc_src_comp_size = bytes_returned;
@@ -272,7 +280,7 @@ int main(int argc, char **argv) {
/* LZ4_compress_fast() */
// Using this function is identical to LZ4_compress_default except we need to specify an "acceleration" value. Defaults to 1.
memset(dst, 0, max_dst_size);
bytes_returned = LZ4_compress_fast(src, dst, src_size, max_dst_size, 1);
bytes_returned = LZ4_compress_fast(src, dst, (int)src_size, (int)max_dst_size, 1);
if (bytes_returned < 1)
run_screaming("Failed to compress src using LZ4_compress_fast. echo $? for return code.", bytes_returned);
if (memcmp(dst, known_good_dst, bytes_returned) != 0)
@@ -282,7 +290,7 @@ int main(int argc, char **argv) {
// Using this function directly requires that we build an LZ4_stream_t struct ourselves. We do NOT have to reset it ourselves.
memset(dst, 0, max_dst_size);
LZ4_stream_t state;
bytes_returned = LZ4_compress_fast_extState(&state, src, dst, src_size, max_dst_size, 1);
bytes_returned = LZ4_compress_fast_extState(&state, src, dst, (int)src_size, (int)max_dst_size, 1);
if (bytes_returned < 1)
run_screaming("Failed to compress src using LZ4_compress_fast_extState. echo $? for return code.", bytes_returned);
if (memcmp(dst, known_good_dst, bytes_returned) != 0)
@@ -315,7 +323,8 @@ int main(int argc, char **argv) {
* Remember, we cannot call LZ4_compress_generic() directly (yet) so it's disabled.
*/
// Suite A - Normal Compressibility
char *dst_d = calloc(1, src_size);
char *dst_d = (char*)calloc(1, src_size);
CHECK(dst_d!=NULL);
memset(dst, 0, max_dst_size);
printf("\nStarting suite A: Normal compressible text.\n");
uint64_t time_taken__default = bench(known_good_dst, ID__LZ4_COMPRESS_DEFAULT, iterations, src, dst, src_size, max_dst_size, src_comp_size);
@@ -336,26 +345,27 @@ int main(int argc, char **argv) {
// Report and leave.
setlocale(LC_ALL, "");
const char *format = "|%-14s|%-30s|%'14.9f|%'16d|%'14d|%'13.2f%%|\n";
const char *format = "|%-14s|%-30s|%'14.9f|%'16d|%'14llu|%'13.2f%%|\n";
const char *header_format = "|%-14s|%-30s|%14s|%16s|%14s|%14s|\n";
const char *separator = "+--------------+------------------------------+--------------+----------------+--------------+--------------+\n";
uint64_t iterllu = (uint64_t)iterations;
printf("\n");
printf("%s", separator);
printf(header_format, "Source", "Function Benchmarked", "Total Seconds", "Iterations/sec", "ns/Iteration", "% of default");
printf("%s", separator);
printf(format, "Normal Text", "LZ4_compress_default()", (double)time_taken__default / BILLION, (int)(iterations / ((double)time_taken__default /BILLION)), (int)time_taken__default / iterations, (double)time_taken__default * 100 / time_taken__default);
printf(format, "Normal Text", "LZ4_compress_fast()", (double)time_taken__fast / BILLION, (int)(iterations / ((double)time_taken__fast /BILLION)), (int)time_taken__fast / iterations, (double)time_taken__fast * 100 / time_taken__default);
printf(format, "Normal Text", "LZ4_compress_fast_extState()", (double)time_taken__fast_extstate / BILLION, (int)(iterations / ((double)time_taken__fast_extstate /BILLION)), (int)time_taken__fast_extstate / iterations, (double)time_taken__fast_extstate * 100 / time_taken__default);
printf(format, "Normal Text", "LZ4_compress_default()", (double)time_taken__default / BILLION, (int)(iterations / ((double)time_taken__default /BILLION)), time_taken__default / iterllu, (double)time_taken__default * 100 / time_taken__default);
printf(format, "Normal Text", "LZ4_compress_fast()", (double)time_taken__fast / BILLION, (int)(iterations / ((double)time_taken__fast /BILLION)), time_taken__fast / iterllu, (double)time_taken__fast * 100 / time_taken__default);
printf(format, "Normal Text", "LZ4_compress_fast_extState()", (double)time_taken__fast_extstate / BILLION, (int)(iterations / ((double)time_taken__fast_extstate /BILLION)), time_taken__fast_extstate / iterllu, (double)time_taken__fast_extstate * 100 / time_taken__default);
//printf(format, "Normal Text", "LZ4_compress_generic()", (double)time_taken__generic / BILLION, (int)(iterations / ((double)time_taken__generic /BILLION)), (int)time_taken__generic / iterations, (double)time_taken__generic * 100 / time_taken__default);
printf(format, "Normal Text", "LZ4_decompress_safe()", (double)time_taken__decomp_safe / BILLION, (int)(iterations / ((double)time_taken__decomp_safe /BILLION)), (int)time_taken__decomp_safe / iterations, (double)time_taken__decomp_safe * 100 / time_taken__default);
printf(format, "Normal Text", "LZ4_decompress_fast()", (double)time_taken__decomp_fast / BILLION, (int)(iterations / ((double)time_taken__decomp_fast /BILLION)), (int)time_taken__decomp_fast / iterations, (double)time_taken__decomp_fast * 100 / time_taken__default);
printf(format, "Normal Text", "LZ4_decompress_safe()", (double)time_taken__decomp_safe / BILLION, (int)(iterations / ((double)time_taken__decomp_safe /BILLION)), time_taken__decomp_safe / iterllu, (double)time_taken__decomp_safe * 100 / time_taken__default);
printf(format, "Normal Text", "LZ4_decompress_fast()", (double)time_taken__decomp_fast / BILLION, (int)(iterations / ((double)time_taken__decomp_fast /BILLION)), time_taken__decomp_fast / iterllu, (double)time_taken__decomp_fast * 100 / time_taken__default);
printf(header_format, "", "", "", "", "", "");
printf(format, "Compressible", "LZ4_compress_default()", (double)time_taken_hc__default / BILLION, (int)(iterations / ((double)time_taken_hc__default /BILLION)), (int)time_taken_hc__default / iterations, (double)time_taken_hc__default * 100 / time_taken_hc__default);
printf(format, "Compressible", "LZ4_compress_fast()", (double)time_taken_hc__fast / BILLION, (int)(iterations / ((double)time_taken_hc__fast /BILLION)), (int)time_taken_hc__fast / iterations, (double)time_taken_hc__fast * 100 / time_taken_hc__default);
printf(format, "Compressible", "LZ4_compress_fast_extState()", (double)time_taken_hc__fast_extstate / BILLION, (int)(iterations / ((double)time_taken_hc__fast_extstate /BILLION)), (int)time_taken_hc__fast_extstate / iterations, (double)time_taken_hc__fast_extstate * 100 / time_taken_hc__default);
printf(format, "Compressible", "LZ4_compress_default()", (double)time_taken_hc__default / BILLION, (int)(iterations / ((double)time_taken_hc__default /BILLION)), time_taken_hc__default / iterllu, (double)time_taken_hc__default * 100 / time_taken_hc__default);
printf(format, "Compressible", "LZ4_compress_fast()", (double)time_taken_hc__fast / BILLION, (int)(iterations / ((double)time_taken_hc__fast /BILLION)), time_taken_hc__fast / iterllu, (double)time_taken_hc__fast * 100 / time_taken_hc__default);
printf(format, "Compressible", "LZ4_compress_fast_extState()", (double)time_taken_hc__fast_extstate / BILLION, (int)(iterations / ((double)time_taken_hc__fast_extstate /BILLION)), time_taken_hc__fast_extstate / iterllu, (double)time_taken_hc__fast_extstate * 100 / time_taken_hc__default);
//printf(format, "Compressible", "LZ4_compress_generic()", (double)time_taken_hc__generic / BILLION, (int)(iterations / ((double)time_taken_hc__generic /BILLION)), (int)time_taken_hc__generic / iterations, (double)time_taken_hc__generic * 100 / time_taken_hc__default);
printf(format, "Compressible", "LZ4_decompress_safe()", (double)time_taken_hc__decomp_safe / BILLION, (int)(iterations / ((double)time_taken_hc__decomp_safe /BILLION)), (int)time_taken_hc__decomp_safe / iterations, (double)time_taken_hc__decomp_safe * 100 / time_taken_hc__default);
printf(format, "Compressible", "LZ4_decompress_fast()", (double)time_taken_hc__decomp_fast / BILLION, (int)(iterations / ((double)time_taken_hc__decomp_fast /BILLION)), (int)time_taken_hc__decomp_fast / iterations, (double)time_taken_hc__decomp_fast * 100 / time_taken_hc__default);
printf(format, "Compressible", "LZ4_decompress_safe()", (double)time_taken_hc__decomp_safe / BILLION, (int)(iterations / ((double)time_taken_hc__decomp_safe /BILLION)), time_taken_hc__decomp_safe / iterllu, (double)time_taken_hc__decomp_safe * 100 / time_taken_hc__default);
printf(format, "Compressible", "LZ4_decompress_fast()", (double)time_taken_hc__decomp_fast / BILLION, (int)(iterations / ((double)time_taken_hc__decomp_fast /BILLION)), time_taken_hc__decomp_fast / iterllu, (double)time_taken_hc__decomp_fast * 100 / time_taken_hc__default);
printf("%s", separator);
printf("\n");
printf("All done, ran %d iterations per test.\n", iterations);
+7
View File
@@ -12,6 +12,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
enum {
BLOCK_BYTES = 1024 * 8,
@@ -38,6 +39,8 @@ size_t read_bin(FILE* fp, void* array, size_t arrayBytes) {
void test_compress(FILE* outFp, FILE* inpFp)
{
assert(outFp != NULL); assert(inpFp != NULL);
LZ4_stream_t lz4Stream_body;
LZ4_stream_t* lz4Stream = &lz4Stream_body;
@@ -73,6 +76,8 @@ void test_compress(FILE* outFp, FILE* inpFp)
void test_decompress(FILE* outFp, FILE* inpFp)
{
assert(outFp != NULL); assert(inpFp != NULL);
LZ4_streamDecode_t lz4StreamDecode_body;
LZ4_streamDecode_t* lz4StreamDecode = &lz4StreamDecode_body;
@@ -116,6 +121,8 @@ int compare(FILE* fp0, FILE* fp1)
{
int result = 0;
assert(fp0 != NULL); assert(fp1 != NULL);
while(0 == result) {
char b0[65536];
char b1[65536];
+46 -37
View File
@@ -1,26 +1,31 @@
# LZ4 Streaming API Example : Double Buffer
# LZ4 Streaming API Example: Double Buffer
by *Takayuki Matsuoka*
`blockStreaming_doubleBuffer.c` is LZ4 Streaming API example which implements double buffer (de)compression.
[`blockStreaming_doubleBuffer.c`](blockStreaming_doubleBuffer.c) is an example
of the LZ4 Streaming API where we implement double buffer (de)compression.
Please note :
Please note:
- Firstly, read "LZ4 Streaming API Basics".
- This is relatively advanced application example.
- Output file is not compatible with lz4frame and platform dependent.
- Firstly, read ["LZ4 Streaming API Basics"](streaming_api_basics.md).
- This is a relatively advanced application example.
- The output file is not compatible with lz4frame and is platform dependent.
## What's the point of this example ?
## What's the point of this example?
- Handle huge file in small amount of memory
- Always better compression ratio than Block API
- Uniform block size
The LZ4 Streaming API can be used to handle compressing a huge file in a small
amount of memory. This example shows how to use a "Double Buffer" to compress
blocks (i.e. chunks) of a uniform size in a stream. The Streaming API used in
this way *always* yields a better compression ratio than the regular Block API.
For an example with non-uniform blocks, see ["LZ4 Streaming API Example: Line by
Line Text Compression"](blockStreaming_lineByLine.md).
## How the compression works
## How compression works
First of all, allocate "Double Buffer" for input and LZ4 compressed data buffer for output.
Double buffer has two pages, "first" page (Page#1) and "second" page (Page#2).
Firstly, allocate "Double Buffer" for input and "compressed data buffer" for
output. Double buffer has two pages, the "first" page (`Page#1`) and the "second"
page (`Page#2`).
```
Double Buffer
@@ -32,10 +37,17 @@ Double buffer has two pages, "first" page (Page#1) and "second" page (Page#2).
|
v
{Out#1}
```
Next, read the first block to the double buffer's first page. Compress it with
`LZ4_compress_continue()`. On the first compression, LZ4 doesn't have any
previous dependencies, so it just compresses the block without dependencies and
writes the compressed block `{Out#1}` to the compressed data buffer. After that,
write `{Out#1}` to the file.
```
Prefix Dependency
+---------+
| |
v |
+---------+----+----+
@@ -44,8 +56,13 @@ Double buffer has two pages, "first" page (Page#1) and "second" page (Page#2).
|
v
{Out#2}
```
Next, read the second block to the double buffer's second page and compress it.
This time, LZ4 can use the dependency on `Block#1` to improve the compression
ratio. This dependency is called "Prefix mode".
```
External Dictionary Mode
+---------+
| |
@@ -56,8 +73,13 @@ Double buffer has two pages, "first" page (Page#1) and "second" page (Page#2).
|
v
{Out#3}
```
Next, read the third block to the double buffer's *first* page and compress it.
This time LZ4 can use dependency on Block#2. This dependency is called "External
Dictionary mode".
```
Prefix Dependency
+---------+
| |
@@ -70,31 +92,18 @@ Double buffer has two pages, "first" page (Page#1) and "second" page (Page#2).
{Out#4}
```
Next, read first block to double buffer's first page. And compress it by `LZ4_compress_continue()`.
For the first time, LZ4 doesn't know any previous dependencies,
so it just compress the line without dependencies and generates compressed block {Out#1} to LZ4 compressed data buffer.
After that, write {Out#1} to the file.
Next, read second block to double buffer's second page. And compress it.
This time, LZ4 can use dependency to Block#1 to improve compression ratio.
This dependency is called "Prefix mode".
Next, read third block to double buffer's *first* page, and compress it.
Also this time, LZ4 can use dependency to Block#2.
This dependency is called "External Dictonaly mode".
Continue these procedure to the end of the file.
Continue this procedure till the end of the file.
## How the decompression works
## How decompression works
Decompression will do reverse order.
Decompression follows the reverse order:
- Read first compressed block.
- Decompress it to the first page and write that page to the file.
- Read second compressed block.
- Decompress it to the second page and write that page to the file.
- Read third compressed block.
- Decompress it to the *first* page and write that page to the file.
- Read the first compressed block.
- Decompress it to the first page and write that page to the file.
- Read the second compressed block.
- Decompress it to the second page and write that page to the file.
- Read the third compressed block.
- Decompress it to the *first* page and write that page to the file.
Continue these procedure to the end of the compressed file.
Continue this procedure till the end of the compressed file.
+7
View File
@@ -12,6 +12,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
static size_t write_uint16(FILE* fp, uint16_t i)
{
@@ -40,6 +41,8 @@ static void test_compress(
size_t messageMaxBytes,
size_t ringBufferBytes)
{
assert(outFp != NULL); assert(inpFp != NULL);
LZ4_stream_t* const lz4Stream = LZ4_createStream();
const size_t cmpBufBytes = LZ4_COMPRESSBOUND(messageMaxBytes);
char* const cmpBuf = (char*) malloc(cmpBufBytes);
@@ -89,6 +92,8 @@ static void test_decompress(
size_t messageMaxBytes,
size_t ringBufferBytes)
{
assert(outFp != NULL); assert(inpFp != NULL);
LZ4_streamDecode_t* const lz4StreamDecode = LZ4_createStreamDecode();
char* const cmpBuf = (char*) malloc(LZ4_COMPRESSBOUND(messageMaxBytes));
char* const decBuf = (char*) malloc(ringBufferBytes);
@@ -123,6 +128,8 @@ static void test_decompress(
static int compare(FILE* f0, FILE* f1)
{
assert(f0 != NULL); assert(f1 != NULL);
int result = 0;
const size_t tempBufferBytes = 65536;
char* const b0 = (char*) malloc(tempBufferBytes);
+14 -1
View File
@@ -10,6 +10,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#define MIN(x, y) ((x) < (y) ? (x) : (y))
@@ -55,6 +56,8 @@ void seek_bin(FILE* fp, long offset, int origin) {
void test_compress(FILE* outFp, FILE* inpFp, void *dict, int dictSize)
{
assert(outFp != NULL); assert(inpFp != NULL);
LZ4_stream_t lz4Stream_body;
LZ4_stream_t* lz4Stream = &lz4Stream_body;
@@ -104,6 +107,8 @@ void test_compress(FILE* outFp, FILE* inpFp, void *dict, int dictSize)
void test_decompress(FILE* outFp, FILE* inpFp, void *dict, int dictSize, int offset, int length)
{
assert(outFp != NULL); assert(inpFp != NULL);
LZ4_streamDecode_t lz4StreamDecode_body;
LZ4_streamDecode_t* lz4StreamDecode = &lz4StreamDecode_body;
@@ -174,6 +179,8 @@ int compare(FILE* fp0, FILE* fp1, int length)
{
int result = 0;
assert(fp0 != NULL); assert(fp1 != NULL);
while(0 == result) {
char b0[4096];
char b1[4096];
@@ -225,9 +232,13 @@ int main(int argc, char* argv[])
printf("offset = [%d]\n", offset);
printf("length = [%d]\n", length);
assert(offset < INT32_MAX); assert(length < INT32_MAX);
/* Load dictionary */
{
FILE* dictFp = fopen(dictFilename, "rb");
assert(dictFp != NULL);
dictSize = (int)read_bin(dictFp, dict, DICTIONARY_BYTES);
fclose(dictFp);
}
@@ -251,7 +262,7 @@ int main(int argc, char* argv[])
FILE* outFp = fopen(decFilename, "wb");
printf("decompress : %s -> %s\n", lz4Filename, decFilename);
test_decompress(outFp, inpFp, dict, DICTIONARY_BYTES, offset, length);
test_decompress(outFp, inpFp, dict, dictSize, offset, length);
printf("decompress : done\n");
fclose(outFp);
@@ -262,6 +273,8 @@ int main(int argc, char* argv[])
{
FILE* inpFp = fopen(inpFilename, "rb");
FILE* decFp = fopen(decFilename, "rb");
assert(inpFp != NULL);assert(decFp != NULL);
seek_bin(inpFp, offset, SEEK_SET);
printf("verify : %s <-> %s\n", inpFilename, decFilename);
+15 -7
View File
@@ -28,7 +28,7 @@ static size_t get_file_size(char *filename)
return 0;
}
return statbuf.st_size;
return (size_t)statbuf.st_size;
}
static int compress_file(FILE* f_in, FILE* f_out)
@@ -36,7 +36,6 @@ static int compress_file(FILE* f_in, FILE* f_out)
assert(f_in != NULL); assert(f_out != NULL);
LZ4F_errorCode_t ret = LZ4F_OK_NoError;
size_t len;
LZ4_writeFile_t* lz4fWrite;
void* const buf = malloc(CHUNK_SIZE);
if (!buf) {
@@ -56,7 +55,7 @@ static int compress_file(FILE* f_in, FILE* f_out)
}
while (1) {
len = fread(buf, 1, CHUNK_SIZE, f_in);
size_t len = fread(buf, 1, CHUNK_SIZE, f_in);
if (ferror(f_in)) {
printf("fread error\n");
@@ -94,6 +93,7 @@ static int decompress_file(FILE* f_in, FILE* f_out)
void* const buf= malloc(CHUNK_SIZE);
if (!buf) {
printf("error: memory allocation failed \n");
return 1;
}
ret = LZ4F_readOpen(&lz4fRead, f_in);
@@ -135,9 +135,11 @@ out:
return 0;
}
/* @return 0 if both FILE* have identical content */
int compareFiles(FILE* fp0, FILE* fp1)
{
int result = 0;
assert(fp0 != NULL); assert(fp1 != NULL);
while (result==0) {
char b0[1024];
@@ -147,7 +149,7 @@ int compareFiles(FILE* fp0, FILE* fp1)
result = (r0 != r1);
if (!r0 || !r1) break;
if (!result) result = memcmp(b0, b1, r0);
if (r0 == r1) result = memcmp(b0, b1, r0);
}
return result;
@@ -175,7 +177,7 @@ int main(int argc, const char **argv) {
{ FILE* const inpFp = fopen(inpFilename, "rb");
FILE* const outFp = fopen(lz4Filename, "wb");
printf("compress : %s -> %s\n", inpFilename, lz4Filename);
LZ4F_errorCode_t ret = compress_file(inpFp, outFp);
int ret = compress_file(inpFp, outFp);
fclose(inpFp);
fclose(outFp);
@@ -188,7 +190,7 @@ int main(int argc, const char **argv) {
inpFilename,
get_file_size(inpFilename),
get_file_size(lz4Filename), /* might overflow is size_t is 32 bits and size_{in,out} > 4 GB */
(double)get_file_size(lz4Filename) / get_file_size(inpFilename) * 100);
(double)get_file_size(lz4Filename) / (double)get_file_size(inpFilename) * 100);
printf("compress : done\n");
}
@@ -198,8 +200,11 @@ int main(int argc, const char **argv) {
FILE* const inpFp = fopen(lz4Filename, "rb");
FILE* const outFp = fopen(decFilename, "wb");
if (inpFp == NULL) exit(1);
if (outFp == NULL) exit(1);
printf("decompress : %s -> %s\n", lz4Filename, decFilename);
LZ4F_errorCode_t ret = decompress_file(inpFp, outFp);
int ret = decompress_file(inpFp, outFp);
fclose(outFp);
fclose(inpFp);
@@ -216,6 +221,9 @@ int main(int argc, const char **argv) {
{ FILE* const inpFp = fopen(inpFilename, "rb");
FILE* const decFp = fopen(decFilename, "rb");
if (inpFp == NULL) exit(1);
if (decFp == NULL) exit(1);
printf("verify : %s <-> %s\n", inpFilename, decFilename);
int const cmp = compareFiles(inpFp, decFp);
@@ -56,6 +56,8 @@ size_t read_bin(FILE* fp, void* array, int arrayBytes) {
void test_compress(FILE* outFp, FILE* inpFp)
{
assert(outFp != NULL); assert(inpFp != NULL);
LZ4_streamHC_t lz4Stream_body = { 0 };
LZ4_streamHC_t* lz4Stream = &lz4Stream_body;
@@ -91,6 +93,8 @@ void test_compress(FILE* outFp, FILE* inpFp)
void test_decompress(FILE* outFp, FILE* inpFp)
{
assert(outFp != NULL); assert(inpFp != NULL);
static char decBuf[DEC_BUFFER_BYTES];
int decOffset = 0;
LZ4_streamDecode_t lz4StreamDecode_body = { 0 };
@@ -132,6 +136,8 @@ void test_decompress(FILE* outFp, FILE* inpFp)
// return ByteNb>0 if different
size_t compare(FILE* f0, FILE* f1)
{
assert(f0 != NULL); assert(f1 != NULL);
size_t result = 1;
for (;;) {
+70 -45
View File
@@ -1,6 +1,6 @@
# ################################################################
# LZ4 library - Makefile
# Copyright (C) Yann Collet 2011-2020
# Copyright (C) Yann Collet 2011-2023
# All rights reserved.
#
# This Makefile is validated for Linux, macOS, *BSD, Hurd, Solaris, MSYS2 targets
@@ -31,12 +31,12 @@
# - LZ4 source repository : https://github.com/lz4/lz4
# - LZ4 forum froup : https://groups.google.com/forum/#!forum/lz4c
# ################################################################
SED = sed
SED ?= sed
# Version numbers
LIBVER_MAJOR_SCRIPT:=`$(SED) -n '/define LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ./lz4.h`
LIBVER_MINOR_SCRIPT:=`$(SED) -n '/define LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ./lz4.h`
LIBVER_PATCH_SCRIPT:=`$(SED) -n '/define LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ./lz4.h`
LIBVER_MAJOR_SCRIPT:=`$(SED) -n '/define[[:blank:]][[:blank:]]*LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ./lz4.h`
LIBVER_MINOR_SCRIPT:=`$(SED) -n '/define[[:blank:]][[:blank:]]*LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ./lz4.h`
LIBVER_PATCH_SCRIPT:=`$(SED) -n '/define[[:blank:]][[:blank:]]*LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ./lz4.h`
LIBVER_SCRIPT:= $(LIBVER_MAJOR_SCRIPT).$(LIBVER_MINOR_SCRIPT).$(LIBVER_PATCH_SCRIPT)
LIBVER_MAJOR := $(shell echo $(LIBVER_MAJOR_SCRIPT))
LIBVER_MINOR := $(shell echo $(LIBVER_MINOR_SCRIPT))
@@ -47,17 +47,24 @@ BUILD_SHARED:=yes
BUILD_STATIC:=yes
CPPFLAGS+= -DXXH_NAMESPACE=LZ4_
CPPFLAGS+= $(MOREFLAGS)
CFLAGS ?= -O3
USERCFLAGS:= -O3 $(CFLAGS)
DEBUGFLAGS:= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \
-Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes \
-Wswitch-enum -Wdeclaration-after-statement \
-Wstrict-prototypes -Wmissing-prototypes \
-Wundef -Wpointer-arith -Wstrict-aliasing=1
CFLAGS += $(DEBUGFLAGS)
FLAGS = $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
CFLAGS = $(DEBUGFLAGS) $(USERCFLAGS)
ALLFLAGS = $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
SRCFILES := $(sort $(wildcard *.c))
OBJFILES = $(SRCFILES:.c=.o)
include ../Makefile.inc
include ../build/make/lz4defs.make
# default is defined as the first target in Makefile, hence before multiconf.make
.PHONY: default
default: lib-release
include ../build/make/multiconf.make
# OS X linker doesn't support -soname, and use different extension
# see : https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html
@@ -70,41 +77,43 @@ else
ifeq ($(WINBASED),yes)
SHARED_EXT = dll
SHARED_EXT_VER = $(SHARED_EXT)
else
else # posix non-mac
SONAME_FLAGS = -Wl,-soname=liblz4.$(SHARED_EXT).$(LIBVER_MAJOR)
SHARED_EXT = so
SHARED_EXT_MAJOR = $(SHARED_EXT).$(LIBVER_MAJOR)
SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER)
endif
# AIX linker doesn't support -soname, hence assigning nil string
ifeq ($(TARGET_OS), AIX)
SONAME_FLAGS =
endif
endif
.PHONY: default
default: lib-release
# silent mode by default; verbose can be triggered by V=1 or VERBOSE=1
$(V)$(VERBOSE).SILENT:
.PHONY:lib-release
lib-release: DEBUGFLAGS :=
lib-release: lib
lib-release: lib liblz4.pc
.PHONY: lib
lib: liblz4.a liblz4
.PHONY: all
all: lib
all: lib liblz4.pc
.PHONY: all32
all32: CFLAGS+=-m32
all32: all
liblz4.a: $(SRCFILES)
ifeq ($(BUILD_STATIC),yes) # can be disabled on command line
@echo compiling static library
$(COMPILE.c) $^
$(AR) rcs $@ *.o
liblz4.a:
ifeq ($(BUILD_STATIC),yes)
$(eval $(call static_library,liblz4.a,$(OBJFILES)))
endif
ifeq ($(WINBASED),yes)
CLEAN += $(liblz4-dll.rc)
liblz4-dll.rc: liblz4-dll.rc.in
@echo creating library resource
$(SED) -e 's|@LIBLZ4@|$(LIBLZ4_NAME)|' \
@@ -116,35 +125,58 @@ liblz4-dll.rc: liblz4-dll.rc.in
liblz4-dll.o: liblz4-dll.rc
$(WINDRES) -i liblz4-dll.rc -o liblz4-dll.o
CLEAN += $(LIBLZ4) $(LIBLZ4_EXP)
$(LIBLZ4): $(SRCFILES) liblz4-dll.o
ifeq ($(BUILD_SHARED),yes)
ifeq ($(BUILD_SHARED),yes)
@echo compiling dynamic library $(LIBVER)
$(CC) $(FLAGS) -DLZ4_DLL_EXPORT=1 -shared $^ -o $@ -Wl,--out-implib,$(LIBLZ4_EXP)
endif
$(CC) $(ALLFLAGS) -DLZ4_DLL_EXPORT=1 -shared $^ $(LDLIBS) -o $@ -Wl,--out-implib,$(LIBLZ4_EXP)
endif
else # not windows
$(LIBLZ4): $(SRCFILES)
$(LIBLZ4): LDFLAGS += -fvisibility=hidden $(SONAME_FLAGS)
ifeq ($(BUILD_SHARED),yes)
@echo compiling dynamic library $(LIBVER)
$(CC) $(FLAGS) -shared $^ -fPIC -fvisibility=hidden $(SONAME_FLAGS) -o $@
@echo creating versioned links
$(LN_SF) $@ liblz4.$(SHARED_EXT_MAJOR)
$(LN_SF) $@ liblz4.$(SHARED_EXT)
$(eval $(call c_dynamic_library,$(LIBLZ4),$(OBJFILES),,echo "$(LIBLZ4) created"))
endif
endif
# Create symlinks for shared library versions (not needed on Windows)
ifneq ($(WINBASED),yes)
liblz4.$(SHARED_EXT_MAJOR): $(LIBLZ4)
$(LN_SF) $< $@
liblz4.$(SHARED_EXT): liblz4.$(SHARED_EXT_MAJOR)
$(LN_SF) $< $@
.PHONY: liblz4
liblz4: $(LIBLZ4) liblz4.$(SHARED_EXT_MAJOR) liblz4.$(SHARED_EXT)
else
# On Windows, LIBLZ4 is the final DLL target (no symlinks needed)
.PHONY: liblz4
liblz4: $(LIBLZ4)
endif
CLEAN += liblz4.pc
liblz4.pc: liblz4.pc.in Makefile
@echo creating pkgconfig
$(SED) -e 's|@PREFIX@|$(prefix)|' \
-e 's|@LIBDIR@|$(libdir)|' \
-e 's|@INCLUDEDIR@|$(includedir)|' \
-e 's|@VERSION@|$(LIBVER)|' \
-e 's|=${prefix}/|=$${prefix}/|' \
$< >$@
.PHONY: clean
clean:
ifeq ($(WINBASED),yes)
$(RM) *.rc
endif
$(RM) core *.o liblz4.pc $(LIBLZ4) $(LIBLZ4_EXP)
$(RM) *.a *.$(SHARED_EXT) *.$(SHARED_EXT_MAJOR) *.$(SHARED_EXT_VER)
$(RM) $(CLEAN) core *.o *.a
$(RM) *.$(SHARED_EXT) *.$(SHARED_EXT_MAJOR) *.$(SHARED_EXT_VER)
$(RM) -r tmp*
@echo Cleaning library completed
#-----------------------------------------------------------------------------
@@ -178,17 +210,9 @@ PKGCONFIGDIR ?= $(libdir)/pkgconfig
endif
pkgconfigdir ?= $(PKGCONFIGDIR)
liblz4.pc: liblz4.pc.in Makefile
@echo creating pkgconfig
$(SED) -e 's|@PREFIX@|$(prefix)|' \
-e 's|@LIBDIR@|$(libdir)|' \
-e 's|@INCLUDEDIR@|$(includedir)|' \
-e 's|@VERSION@|$(LIBVER)|' \
-e 's|=${prefix}/|=$${prefix}/|' \
$< >$@
.PHONY: install
install: lib liblz4.pc
$(INSTALL_DIR) $(DESTDIR)$(pkgconfigdir)/ $(DESTDIR)$(includedir)/ $(DESTDIR)$(libdir)/ $(DESTDIR)$(bindir)/
$(MAKE_DIR) $(DESTDIR)$(pkgconfigdir)/ $(DESTDIR)$(includedir)/ $(DESTDIR)$(libdir)/ $(DESTDIR)$(bindir)/
$(INSTALL_DATA) liblz4.pc $(DESTDIR)$(pkgconfigdir)/
@echo Installing libraries in $(DESTDIR)$(libdir)
ifeq ($(BUILD_STATIC),yes)
@@ -215,6 +239,7 @@ install: lib liblz4.pc
$(INSTALL_DATA) lz4frame.h $(DESTDIR)$(includedir)/lz4frame.h
@echo lz4 libraries installed
.PHONY: uninstall
uninstall:
$(RM) $(DESTDIR)$(pkgconfigdir)/liblz4.pc
ifeq (WINBASED,yes)
+9 -3
View File
@@ -17,7 +17,7 @@ They generate and decode data using the [LZ4 block format].
#### Level 2 : High Compression variant
For more compression ratio at the cost of compression speed,
For better compression ratio at the cost of compression speed,
the High Compression variant called **lz4hc** is available.
Add files **`lz4hc.c`** and **`lz4hc.h`**.
This variant also compresses data using the [LZ4 block format],
@@ -108,6 +108,12 @@ The following build macro can be selected to adjust source code behavior at comp
Remove support of dynamic memory allocation.
For more details, see description of this macro in `lib/lz4.c`.
- `LZ4_STATIC_LINKING_ONLY_ENDIANNESS_INDEPENDENT_OUTPUT` : experimental feature aimed at producing the same
compressed output on platforms of different endianness (i.e. little-endian and big-endian).
Output on little-endian platforms shall remain unchanged, while big-endian platforms will start producing
the same output as little-endian ones. This isn't expected to impact backward- and forward-compatibility
in any way.
- `LZ4_FREESTANDING` : by setting this build macro to 1,
LZ4/HC removes dependencies on the C standard library,
including allocation functions and `memmove()`, `memcpy()`, and `memset()`.
@@ -131,8 +137,8 @@ The following build macro can be selected to adjust source code behavior at comp
#### Makefile variables
The following `Makefile` variables can be selected to alter the profile of produced binaries :
- `BUILD_SHARED` : generate `libzstd` dynamic library (enabled by default)
- `BUILD_STATIC` : generate `libzstd` static library (enabled by default)
- `BUILD_SHARED` : generate `liblz4` dynamic library (enabled by default)
- `BUILD_STATIC` : generate `liblz4` static library (enabled by default)
#### Amalgamation
+1
View File
@@ -9,6 +9,7 @@ includedir=@INCLUDEDIR@
Name: lz4
Description: extremely fast lossless compression algorithm library
URL: http://www.lz4.org/
License: BSD-2-Clause
Version: @VERSION@
Libs: -L${libdir} -llz4
Cflags: -I${includedir}
+182 -86
View File
@@ -1,6 +1,6 @@
/*
LZ4 - Fast LZ compression algorithm
Copyright (C) 2011-2020, Yann Collet.
Copyright (c) Yann Collet. All rights reserved.
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
@@ -77,7 +77,8 @@
#ifndef LZ4_FORCE_MEMORY_ACCESS /* can be defined externally */
# if defined(__GNUC__) && \
( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) \
|| defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) )
|| defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) \
|| (defined(__riscv) && defined(__riscv_zicclsm)) )
# define LZ4_FORCE_MEMORY_ACCESS 2
# elif (defined(__INTEL_COMPILER) && !defined(_WIN32)) || defined(__GNUC__) || defined(_MSC_VER)
# define LZ4_FORCE_MEMORY_ACCESS 1
@@ -106,15 +107,13 @@
# define LZ4_SRC_INCLUDED 1
#endif
#ifndef LZ4_STATIC_LINKING_ONLY
#define LZ4_STATIC_LINKING_ONLY
#endif
#ifndef LZ4_DISABLE_DEPRECATE_WARNINGS
#define LZ4_DISABLE_DEPRECATE_WARNINGS /* due to LZ4_decompress_safe_withPrefix64k */
# define LZ4_DISABLE_DEPRECATE_WARNINGS /* due to LZ4_decompress_safe_withPrefix64k */
#endif
#define LZ4_STATIC_LINKING_ONLY /* LZ4_DISTANCE_MAX */
#ifndef LZ4_STATIC_LINKING_ONLY
# define LZ4_STATIC_LINKING_ONLY
#endif
#include "lz4.h"
/* see also "memory routines" below */
@@ -126,14 +125,17 @@
# include <intrin.h> /* only present in VS2005+ */
# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
# pragma warning(disable : 6237) /* disable: C6237: conditional expression is always 0 */
# pragma warning(disable : 6239) /* disable: C6239: (<non-zero constant> && <expression>) always evaluates to the result of <expression> */
# pragma warning(disable : 6240) /* disable: C6240: (<expression> && <non-zero constant>) always evaluates to the result of <expression> */
# pragma warning(disable : 6326) /* disable: C6326: Potential comparison of a constant with another constant */
#endif /* _MSC_VER */
#ifndef LZ4_FORCE_INLINE
# ifdef _MSC_VER /* Visual Studio */
# if defined (_MSC_VER) && !defined (__clang__) /* MSVC */
# define LZ4_FORCE_INLINE static __forceinline
# else
# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
# ifdef __GNUC__
# if defined (__GNUC__) || defined (__clang__)
# define LZ4_FORCE_INLINE static inline __attribute__((always_inline))
# else
# define LZ4_FORCE_INLINE static inline
@@ -300,12 +302,12 @@ static int LZ4_isAligned(const void* ptr, size_t alignment)
#include <limits.h>
#if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
# include <stdint.h>
typedef uint8_t BYTE;
typedef uint16_t U16;
typedef uint32_t U32;
typedef int32_t S32;
typedef uint64_t U64;
typedef uintptr_t uptrval;
typedef unsigned char BYTE; /*uint8_t not necessarily blessed to alias arbitrary type*/
typedef uint16_t U16;
typedef uint32_t U32;
typedef int32_t S32;
typedef uint64_t U64;
typedef uintptr_t uptrval;
#else
# if UINT_MAX != 4294967295UL
# error "LZ4 code (when not C++ or C99) assumes that sizeof(int) == 4"
@@ -432,10 +434,22 @@ static U16 LZ4_readLE16(const void* memPtr)
return LZ4_read16(memPtr);
} else {
const BYTE* p = (const BYTE*)memPtr;
return (U16)((U16)p[0] + (p[1]<<8));
return (U16)((U16)p[0] | (p[1]<<8));
}
}
#ifdef LZ4_STATIC_LINKING_ONLY_ENDIANNESS_INDEPENDENT_OUTPUT
static U32 LZ4_readLE32(const void* memPtr)
{
if (LZ4_isLittleEndian()) {
return LZ4_read32(memPtr);
} else {
const BYTE* p = (const BYTE*)memPtr;
return (U32)p[0] | (p[1]<<8) | (p[2]<<16) | (p[3]<<24);
}
}
#endif
static void LZ4_writeLE16(void* memPtr, U16 value)
{
if (LZ4_isLittleEndian()) {
@@ -465,12 +479,7 @@ static const int dec64table[8] = {0, 0, 0, -1, -4, 1, 2, 3};
#ifndef LZ4_FAST_DEC_LOOP
# if defined __i386__ || defined _M_IX86 || defined __x86_64__ || defined _M_X64
# define LZ4_FAST_DEC_LOOP 1
# elif defined(__aarch64__) && defined(__APPLE__)
# define LZ4_FAST_DEC_LOOP 1
# elif defined(__aarch64__) && !defined(__clang__)
/* On non-Apple aarch64, we disable this optimization for clang because
* on certain mobile chipsets, performance is reduced with clang. For
* more information refer to https://github.com/lz4/lz4/pull/707 */
# elif defined(__aarch64__)
# define LZ4_FAST_DEC_LOOP 1
# else
# define LZ4_FAST_DEC_LOOP 0
@@ -485,10 +494,9 @@ LZ4_memcpy_using_offset_base(BYTE* dstPtr, const BYTE* srcPtr, BYTE* dstEnd, con
assert(srcPtr + offset == dstPtr);
if (offset < 8) {
LZ4_write32(dstPtr, 0); /* silence an msan warning when offset==0 */
dstPtr[0] = srcPtr[0];
dstPtr[1] = srcPtr[1];
dstPtr[2] = srcPtr[2];
dstPtr[3] = srcPtr[3];
assert(offset != 1); /* offset==0 happens on testing */
LZ4_memcpy(dstPtr, srcPtr, 2);
LZ4_memcpy(dstPtr + 2, srcPtr + 2, 2);
srcPtr += inc32table[offset];
LZ4_memcpy(dstPtr+4, srcPtr, 4);
srcPtr -= dec64table[offset];
@@ -502,6 +510,20 @@ LZ4_memcpy_using_offset_base(BYTE* dstPtr, const BYTE* srcPtr, BYTE* dstEnd, con
LZ4_wildCopy8(dstPtr, srcPtr, dstEnd);
}
#ifdef __aarch64__
/* customized variant of memcpy, which can overwrite up to 64 bytes beyond dstEnd */
LZ4_FORCE_INLINE void
LZ4_wildCopy64(void* dstPtr, const void* srcPtr, void* dstEnd)
{
BYTE* d = (BYTE*)dstPtr;
const BYTE* s = (const BYTE*)srcPtr;
BYTE* const e = (BYTE*)dstEnd;
do { LZ4_memcpy(d,s,64); d+=64; s+=64; } while (d<e);
}
#endif
/* customized variant of memcpy, which can overwrite up to 32 bytes beyond dstEnd
* this version copies two times 16 bytes (instead of one time 32 bytes)
* because it must be compatible with offsets >= 16. */
@@ -517,7 +539,7 @@ LZ4_wildCopy32(void* dstPtr, const void* srcPtr, void* dstEnd)
/* LZ4_memcpy_using_offset() presumes :
* - dstEnd >= dstPtr + MINMATCH
* - there is at least 8 bytes available to write after dstEnd */
* - there is at least 12 bytes available to write after dstEnd */
LZ4_FORCE_INLINE void
LZ4_memcpy_using_offset(BYTE* dstPtr, const BYTE* srcPtr, BYTE* dstEnd, const size_t offset)
{
@@ -532,12 +554,12 @@ LZ4_memcpy_using_offset(BYTE* dstPtr, const BYTE* srcPtr, BYTE* dstEnd, const si
case 2:
LZ4_memcpy(v, srcPtr, 2);
LZ4_memcpy(&v[2], srcPtr, 2);
#if defined(_MSC_VER) && (_MSC_VER <= 1936) /* MSVC 2022 ver 17.6 or earlier */
#if defined(_MSC_VER) && (_MSC_VER <= 1937) /* MSVC 2022 ver 17.7 or earlier */
# pragma warning(push)
# pragma warning(disable : 6385) /* warning C6385: Reading invalid data from 'v'. */
#endif
LZ4_memcpy(&v[4], v, 4);
#if defined(_MSC_VER) && (_MSC_VER <= 1936) /* MSVC 2022 ver 17.6 or earlier */
#if defined(_MSC_VER) && (_MSC_VER <= 1937) /* MSVC 2022 ver 17.7 or earlier */
# pragma warning(pop)
#endif
break;
@@ -784,7 +806,12 @@ LZ4_FORCE_INLINE U32 LZ4_hash5(U64 sequence, tableType_t const tableType)
LZ4_FORCE_INLINE U32 LZ4_hashPosition(const void* const p, tableType_t const tableType)
{
if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType);
#ifdef LZ4_STATIC_LINKING_ONLY_ENDIANNESS_INDEPENDENT_OUTPUT
return LZ4_hash4(LZ4_readLE32(p), tableType);
#else
return LZ4_hash4(LZ4_read32(p), tableType);
#endif
}
LZ4_FORCE_INLINE void LZ4_clearHash(U32 h, void* tableBase, tableType_t const tableType)
@@ -878,7 +905,7 @@ LZ4_prepareTable(LZ4_stream_t_internal* const cctx,
|| tableType == byPtr
|| inputSize >= 4 KB)
{
DEBUGLOG(4, "LZ4_prepareTable: Resetting table in %p", cctx);
DEBUGLOG(4, "LZ4_prepareTable: Resetting table in %p", (void*)cctx);
MEM_INIT(cctx->hashTable, 0, LZ4_HASHTABLESIZE);
cctx->currentOffset = 0;
cctx->tableType = (U32)clearedTable;
@@ -903,7 +930,7 @@ LZ4_prepareTable(LZ4_stream_t_internal* const cctx,
cctx->dictSize = 0;
}
/** LZ4_compress_generic() :
/** LZ4_compress_generic_validated() :
* inlined, to ensure branches are decided at compilation time.
* The following conditions are presumed already validated:
* - source != NULL
@@ -1085,7 +1112,10 @@ LZ4_FORCE_INLINE int LZ4_compress_generic_validated(
/* Catch up */
filledIp = ip;
while (((ip>anchor) & (match > lowLimit)) && (unlikely(ip[-1]==match[-1]))) { ip--; match--; }
assert(ip > anchor); /* this is always true as ip has been advanced before entering the main loop */
if ((match > lowLimit) && unlikely(ip[-1] == match[-1])) {
do { ip--; match--; } while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1])));
}
/* Encode Literals */
{ unsigned const litLength = (unsigned)(ip - anchor);
@@ -1100,7 +1130,7 @@ LZ4_FORCE_INLINE int LZ4_compress_generic_validated(
goto _last_literals;
}
if (litLength >= RUN_MASK) {
int len = (int)(litLength - RUN_MASK);
unsigned len = litLength - RUN_MASK;
*token = (RUN_MASK<<ML_BITS);
for(; len >= 255 ; len-=255) *op++ = 255;
*op++ = (BYTE)len;
@@ -1457,22 +1487,30 @@ int LZ4_compress_default(const char* src, char* dst, int srcSize, int dstCapacit
/* Note!: This function leaves the stream in an unclean/broken state!
* It is not safe to subsequently use the same state with a _fastReset() or
* _continue() call without resetting it. */
static int LZ4_compress_destSize_extState (LZ4_stream_t* state, const char* src, char* dst, int* srcSizePtr, int targetDstSize)
static int LZ4_compress_destSize_extState_internal(LZ4_stream_t* state, const char* src, char* dst, int* srcSizePtr, int targetDstSize, int acceleration)
{
void* const s = LZ4_initStream(state, sizeof (*state));
assert(s != NULL); (void)s;
if (targetDstSize >= LZ4_compressBound(*srcSizePtr)) { /* compression success is guaranteed */
return LZ4_compress_fast_extState(state, src, dst, *srcSizePtr, targetDstSize, 1);
return LZ4_compress_fast_extState(state, src, dst, *srcSizePtr, targetDstSize, acceleration);
} else {
if (*srcSizePtr < LZ4_64Klimit) {
return LZ4_compress_generic(&state->internal_donotuse, src, dst, *srcSizePtr, srcSizePtr, targetDstSize, fillOutput, byU16, noDict, noDictIssue, 1);
return LZ4_compress_generic(&state->internal_donotuse, src, dst, *srcSizePtr, srcSizePtr, targetDstSize, fillOutput, byU16, noDict, noDictIssue, acceleration);
} else {
tableType_t const addrMode = ((sizeof(void*)==4) && ((uptrval)src > LZ4_DISTANCE_MAX)) ? byPtr : byU32;
return LZ4_compress_generic(&state->internal_donotuse, src, dst, *srcSizePtr, srcSizePtr, targetDstSize, fillOutput, addrMode, noDict, noDictIssue, 1);
return LZ4_compress_generic(&state->internal_donotuse, src, dst, *srcSizePtr, srcSizePtr, targetDstSize, fillOutput, addrMode, noDict, noDictIssue, acceleration);
} }
}
int LZ4_compress_destSize_extState(void* state, const char* src, char* dst, int* srcSizePtr, int targetDstSize, int acceleration)
{
int const r = LZ4_compress_destSize_extState_internal((LZ4_stream_t*)state, src, dst, srcSizePtr, targetDstSize, acceleration);
/* clean the state on exit */
LZ4_initStream(state, sizeof (LZ4_stream_t));
return r;
}
int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, int targetDstSize)
{
@@ -1484,7 +1522,7 @@ int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, int targe
LZ4_stream_t* const ctx = &ctxBody;
#endif
int result = LZ4_compress_destSize_extState(ctx, src, dst, srcSizePtr, targetDstSize);
int result = LZ4_compress_destSize_extState_internal(ctx, src, dst, srcSizePtr, targetDstSize, 1);
#if (LZ4_HEAPMODE)
FREEMEM(ctx);
@@ -1503,7 +1541,7 @@ LZ4_stream_t* LZ4_createStream(void)
{
LZ4_stream_t* const lz4s = (LZ4_stream_t*)ALLOC(sizeof(LZ4_stream_t));
LZ4_STATIC_ASSERT(sizeof(LZ4_stream_t) >= sizeof(LZ4_stream_t_internal));
DEBUGLOG(4, "LZ4_createStream %p", lz4s);
DEBUGLOG(4, "LZ4_createStream %p", (void*)lz4s);
if (lz4s == NULL) return NULL;
LZ4_initStream(lz4s, sizeof(*lz4s));
return lz4s;
@@ -1534,7 +1572,7 @@ LZ4_stream_t* LZ4_initStream (void* buffer, size_t size)
* prefer initStream() which is more general */
void LZ4_resetStream (LZ4_stream_t* LZ4_stream)
{
DEBUGLOG(5, "LZ4_resetStream (ctx:%p)", LZ4_stream);
DEBUGLOG(5, "LZ4_resetStream (ctx:%p)", (void*)LZ4_stream);
MEM_INIT(LZ4_stream, 0, sizeof(LZ4_stream_t_internal));
}
@@ -1546,15 +1584,18 @@ void LZ4_resetStream_fast(LZ4_stream_t* ctx) {
int LZ4_freeStream (LZ4_stream_t* LZ4_stream)
{
if (!LZ4_stream) return 0; /* support free on NULL */
DEBUGLOG(5, "LZ4_freeStream %p", LZ4_stream);
DEBUGLOG(5, "LZ4_freeStream %p", (void*)LZ4_stream);
FREEMEM(LZ4_stream);
return (0);
}
#endif
typedef enum { _ld_fast, _ld_slow } LoadDict_mode_e;
#define HASH_UNIT sizeof(reg_t)
int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize)
static int LZ4_loadDict_internal(LZ4_stream_t* LZ4_dict,
const char* dictionary, int dictSize,
LoadDict_mode_e _ld)
{
LZ4_stream_t_internal* const dict = &LZ4_dict->internal_donotuse;
const tableType_t tableType = byU32;
@@ -1562,7 +1603,7 @@ int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize)
const BYTE* const dictEnd = p + dictSize;
U32 idx32;
DEBUGLOG(4, "LZ4_loadDict (%i bytes from %p into %p)", dictSize, dictionary, LZ4_dict);
DEBUGLOG(4, "LZ4_loadDict (%i bytes from %p into %p)", dictSize, (void*)dictionary, (void*)LZ4_dict);
/* It's necessary to reset the context,
* and not just continue it with prepareTable()
@@ -1590,20 +1631,46 @@ int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize)
while (p <= dictEnd-HASH_UNIT) {
U32 const h = LZ4_hashPosition(p, tableType);
/* Note: overwriting => favors positions end of dictionary */
LZ4_putIndexOnHash(idx32, h, dict->hashTable, tableType);
p+=3; idx32+=3;
}
if (_ld == _ld_slow) {
/* Fill hash table with additional references, to improve compression capability */
p = dict->dictionary;
idx32 = dict->currentOffset - dict->dictSize;
while (p <= dictEnd-HASH_UNIT) {
U32 const h = LZ4_hashPosition(p, tableType);
U32 const limit = dict->currentOffset - 64 KB;
if (LZ4_getIndexOnHash(h, dict->hashTable, tableType) <= limit) {
/* Note: not overwriting => favors positions beginning of dictionary */
LZ4_putIndexOnHash(idx32, h, dict->hashTable, tableType);
}
p++; idx32++;
}
}
return (int)dict->dictSize;
}
int LZ4_loadDict(LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize)
{
return LZ4_loadDict_internal(LZ4_dict, dictionary, dictSize, _ld_fast);
}
int LZ4_loadDictSlow(LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize)
{
return LZ4_loadDict_internal(LZ4_dict, dictionary, dictSize, _ld_slow);
}
void LZ4_attach_dictionary(LZ4_stream_t* workingStream, const LZ4_stream_t* dictionaryStream)
{
const LZ4_stream_t_internal* dictCtx = (dictionaryStream == NULL) ? NULL :
&(dictionaryStream->internal_donotuse);
DEBUGLOG(4, "LZ4_attach_dictionary (%p, %p, size %u)",
workingStream, dictionaryStream,
(void*)workingStream, (void*)dictionaryStream,
dictCtx != NULL ? dictCtx->dictSize : 0);
if (dictCtx != NULL) {
@@ -1667,7 +1734,7 @@ int LZ4_compress_fast_continue (LZ4_stream_t* LZ4_stream,
&& (inputSize > 0) /* tolerance : don't lose history, in case next invocation would use prefix mode */
&& (streamPtr->dictCtx == NULL) /* usingDictCtx */
) {
DEBUGLOG(5, "LZ4_compress_fast_continue: dictSize(%u) at addr:%p is too small", streamPtr->dictSize, streamPtr->dictionary);
DEBUGLOG(5, "LZ4_compress_fast_continue: dictSize(%u) at addr:%p is too small", streamPtr->dictSize, (void*)streamPtr->dictionary);
/* remove dictionary existence from history, to employ faster prefix mode */
streamPtr->dictSize = 0;
streamPtr->dictionary = (const BYTE*)source;
@@ -1757,7 +1824,7 @@ int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize)
{
LZ4_stream_t_internal* const dict = &LZ4_dict->internal_donotuse;
DEBUGLOG(5, "LZ4_saveDict : dictSize=%i, safeBuffer=%p", dictSize, safeBuffer);
DEBUGLOG(5, "LZ4_saveDict : dictSize=%i, safeBuffer=%p", dictSize, (void*)safeBuffer);
if ((U32)dictSize > 64 KB) { dictSize = 64 KB; } /* useless to define a dictionary > 64 KB */
if ((U32)dictSize > dict->dictSize) { dictSize = (int)dict->dictSize; }
@@ -1910,36 +1977,37 @@ LZ4_decompress_unsafe_generic(
/* Read the variable-length literal or match length.
*
* @ip : input pointer
* @ilimit : position after which if length is not decoded, the input is necessarily corrupted.
* @initial_check - check ip >= ipmax before start of loop. Returns initial_error if so.
* @error (output) - error code. Must be set to 0 before call.
* @ipPtr : pointer to input pointer, will be advanced
* @ilimit : read is forbidden beyond this position (must be within input buffer)
**/
typedef size_t Rvl_t;
static const Rvl_t rvl_error = (Rvl_t)(-1);
LZ4_FORCE_INLINE Rvl_t
read_variable_length(const BYTE** ip, const BYTE* ilimit,
int initial_check)
read_variable_length(const BYTE** ipPtr, const BYTE* ilimit)
{
Rvl_t s, length = 0;
assert(ip != NULL);
assert(*ip != NULL);
assert(ipPtr != NULL);
assert(*ipPtr != NULL);
assert(ilimit != NULL);
if (initial_check && unlikely((*ip) >= ilimit)) { /* read limit reached */
if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */
return rvl_error;
}
s = **ipPtr;
(*ipPtr)++;
length += s;
if (likely(s != 255)) return length;
do {
s = **ip;
(*ip)++;
if (unlikely((*ipPtr) >= ilimit)) { /* read limit reached */
return rvl_error;
}
s = **ipPtr;
(*ipPtr)++;
length += s;
if (unlikely((*ip) > ilimit)) { /* read limit reached */
return rvl_error;
}
/* accumulator overflow detection (32-bit mode only) */
if ((sizeof(length)<8) && unlikely(length > ((Rvl_t)(-1)/2)) ) {
if ((sizeof(length) < 8) && unlikely(length > ((Rvl_t)(-1)/2)) ) {
return rvl_error;
}
} while (s==255);
} while (s == 255);
return length;
}
@@ -2005,7 +2073,7 @@ LZ4_decompress_generic(
* note : fast loop may show a regression for some client arm chips. */
#if LZ4_FAST_DEC_LOOP
if ((oend - op) < FASTLOOP_SAFE_DISTANCE) {
DEBUGLOG(6, "skip fast decode loop");
DEBUGLOG(6, "move to safe decode loop");
goto safe_decode;
}
@@ -2017,50 +2085,61 @@ LZ4_decompress_generic(
assert(ip < iend);
token = *ip++;
length = token >> ML_BITS; /* literal length */
DEBUGLOG(7, "blockPos%6u: litLength token = %u", (unsigned)(op-(BYTE*)dst), (unsigned)length);
if (ip > iend-(16 + 1/*max lit + offset + nextToken*/)) { goto safe_literal_copy_early; }
/* decode literal length */
if (length == RUN_MASK) {
size_t const addl = read_variable_length(&ip, iend-RUN_MASK, 1);
/* literal length >= RUN_MASK means >= RUN_MASK literal bytes follow the extension bytes,
* so extension bytes cannot reach the last RUN_MASK bytes of input */
size_t const addl = read_variable_length(&ip, iend - RUN_MASK);
if (addl == rvl_error) {
DEBUGLOG(6, "error reading long literal length");
goto _output_error;
}
length += addl;
if (unlikely((uptrval)(op)+length<(uptrval)(op))) { goto _output_error; } /* overflow detection */
cpy = op+length;
if (unlikely((uptrval)(cpy)<(uptrval)(op))) { goto _output_error; } /* overflow detection */
if (unlikely((uptrval)(ip)+length<(uptrval)(ip))) { goto _output_error; } /* overflow detection */
/* copy literals */
LZ4_STATIC_ASSERT(MFLIMIT >= WILDCOPYLENGTH);
if ((op+length>oend-32) || (ip+length>iend-32)) { goto safe_literal_copy; }
LZ4_wildCopy32(op, ip, op+length);
ip += length; op += length;
} else if (ip <= iend-(16 + 1/*max lit + offset + nextToken*/)) {
/* We don't need to check oend, since we check it once for each loop below */
#ifdef __aarch64__
if ((cpy>oend-64) || (ip+length>iend-64)) { goto safe_literal_copy; }
LZ4_wildCopy64(op, ip, cpy);
#else
if ((cpy>oend-32) || (ip+length>iend-32)) { goto safe_literal_copy; }
LZ4_wildCopy32(op, ip, cpy);
#endif
ip += length; op = cpy;
} else {
DEBUGLOG(7, "copy %u bytes in a 16-bytes stripe", (unsigned)length);
/* Literals can only be <= 14, but hope compilers optimize better when copy by a register size */
LZ4_memcpy(op, ip, 16);
ip += length; op += length;
} else {
goto safe_literal_copy;
}
/* get offset */
offset = LZ4_readLE16(ip); ip+=2;
DEBUGLOG(6, " offset = %zu", offset);
DEBUGLOG(6, "blockPos%6u: offset = %u", (unsigned)(op-(BYTE*)dst), (unsigned)offset);
match = op - offset;
assert(match <= op); /* overflow check */
/* get matchlength */
length = token & ML_MASK;
DEBUGLOG(7, " match length token = %u (len==%u)", (unsigned)length, (unsigned)length+MINMATCH);
if (length == ML_MASK) {
size_t const addl = read_variable_length(&ip, iend - LASTLITERALS + 1, 0);
/* after match length extension bytes, at least 1 token + LASTLITERALS literals must remain */
size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS));
if (addl == rvl_error) {
DEBUGLOG(6, "error reading long match length");
DEBUGLOG(5, "error reading long match length");
goto _output_error;
}
length += addl;
length += MINMATCH;
DEBUGLOG(7, " long match length == %u", (unsigned)length);
if (unlikely((uptrval)(op)+length<(uptrval)op)) { goto _output_error; } /* overflow detection */
if (op + length >= oend - FASTLOOP_SAFE_DISTANCE) {
goto safe_match_copy;
@@ -2068,6 +2147,7 @@ LZ4_decompress_generic(
} else {
length += MINMATCH;
if (op + length >= oend - FASTLOOP_SAFE_DISTANCE) {
DEBUGLOG(7, "moving to safe_match_copy (ml==%u)", (unsigned)length);
goto safe_match_copy;
}
@@ -2086,7 +2166,7 @@ LZ4_decompress_generic(
} } }
if ( checkOffset && (unlikely(match + dictSize < lowPrefix)) ) {
DEBUGLOG(6, "Error : pos=%zi, offset=%zi => outside buffers", op-lowPrefix, op-match);
DEBUGLOG(5, "Error : pos=%zi, offset=%zi => outside buffers", op-lowPrefix, op-match);
goto _output_error;
}
/* match starting within external dictionary */
@@ -2125,9 +2205,13 @@ LZ4_decompress_generic(
/* copy match within block */
cpy = op + length;
assert((op <= oend) && (oend-op >= 32));
assert((op <= oend) && (oend-op >= 64));
if (unlikely(offset<16)) {
LZ4_memcpy_using_offset(op, match, cpy, offset);
#ifdef __aarch64__
} else if (offset >= 64) {
LZ4_wildCopy64(op, match, cpy);
#endif
} else {
LZ4_wildCopy32(op, match, cpy);
}
@@ -2143,6 +2227,7 @@ LZ4_decompress_generic(
assert(ip < iend);
token = *ip++;
length = token >> ML_BITS; /* literal length */
DEBUGLOG(7, "blockPos%6u: litLength token = %u", (unsigned)(op-(BYTE*)dst), (unsigned)length);
/* A two-stage shortcut for the most common case:
* 1) If the literal length is 0..14, and there is enough space,
@@ -2163,6 +2248,7 @@ LZ4_decompress_generic(
/* The second stage: prepare for match copying, decode full info.
* If it doesn't work out, the info won't be wasted. */
length = token & ML_MASK; /* match length */
DEBUGLOG(7, "blockPos%6u: matchLength token = %u (len=%u)", (unsigned)(op-(BYTE*)dst), (unsigned)length, (unsigned)length + 4);
offset = LZ4_readLE16(ip); ip += 2;
match = op - offset;
assert(match <= op); /* check overflow */
@@ -2185,20 +2271,27 @@ LZ4_decompress_generic(
goto _copy_match;
}
#if LZ4_FAST_DEC_LOOP
safe_literal_copy_early:
#endif
/* decode literal length */
if (length == RUN_MASK) {
size_t const addl = read_variable_length(&ip, iend-RUN_MASK, 1);
/* literal length >= RUN_MASK means >= RUN_MASK literal bytes follow the extension bytes,
* so extension bytes cannot reach the last RUN_MASK bytes of input */
size_t const addl = read_variable_length(&ip, iend-RUN_MASK);
if (addl == rvl_error) { goto _output_error; }
length += addl;
if (unlikely((uptrval)(op)+length<(uptrval)(op))) { goto _output_error; } /* overflow detection */
if (unlikely((uptrval)(ip)+length<(uptrval)(ip))) { goto _output_error; } /* overflow detection */
}
/* copy literals */
cpy = op+length;
#if LZ4_FAST_DEC_LOOP
safe_literal_copy:
#endif
/* copy literals */
cpy = op+length;
LZ4_STATIC_ASSERT(MFLIMIT >= WILDCOPYLENGTH);
if ((cpy>oend-MFLIMIT) || (ip+length>iend-(2+1+LASTLITERALS))) {
@@ -2235,9 +2328,10 @@ LZ4_decompress_generic(
* so check that we exactly consume the input and don't overrun the output buffer.
*/
if ((ip+length != iend) || (cpy > oend)) {
DEBUGLOG(6, "should have been last run of literals")
DEBUGLOG(6, "ip(%p) + length(%i) = %p != iend (%p)", ip, (int)length, ip+length, iend);
DEBUGLOG(6, "or cpy(%p) > oend(%p)", cpy, oend);
DEBUGLOG(5, "should have been last run of literals")
DEBUGLOG(5, "ip(%p) + length(%i) = %p != iend (%p)", (void*)ip, (int)length, (void*)(ip+length), (void*)iend);
DEBUGLOG(5, "or cpy(%p) > (oend-MFLIMIT)(%p)", (void*)cpy, (void*)(oend-MFLIMIT));
DEBUGLOG(5, "after writing %u bytes / %i bytes available", (unsigned)(op-(BYTE*)dst), outputSize);
goto _output_error;
}
}
@@ -2263,10 +2357,12 @@ LZ4_decompress_generic(
/* get matchlength */
length = token & ML_MASK;
DEBUGLOG(7, "blockPos%6u: matchLength token = %u", (unsigned)(op-(BYTE*)dst), (unsigned)length);
_copy_match:
if (length == ML_MASK) {
size_t const addl = read_variable_length(&ip, iend - LASTLITERALS + 1, 0);
/* after match length extension bytes, at least 1 token + LASTLITERALS literals must remain */
size_t const addl = read_variable_length(&ip, iend - (1 + LASTLITERALS));
if (addl == rvl_error) { goto _output_error; }
length += addl;
if (unlikely((uptrval)(op)+length<(uptrval)op)) goto _output_error; /* overflow detection */
@@ -2352,7 +2448,7 @@ LZ4_decompress_generic(
while (op < cpy) { *op++ = *match++; }
} else {
LZ4_memcpy(op, match, 8);
if (length > 16) { LZ4_wildCopy8(op+8, match+8, cpy); }
if (length > 16) { LZ4_wildCopy8(op+8, match+8, cpy); }
}
op = cpy; /* wildcopy correction */
}
+90 -66
View File
@@ -1,7 +1,7 @@
/*
* LZ4 - Fast LZ compression algorithm
* Header File
* Copyright (C) 2011-2020, Yann Collet.
* Copyright (c) Yann Collet. All rights reserved.
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
@@ -129,8 +129,8 @@ extern "C" {
/*------ Version ------*/
#define LZ4_VERSION_MAJOR 1 /* for breaking interface changes */
#define LZ4_VERSION_MINOR 9 /* for new (non-breaking) interface capabilities */
#define LZ4_VERSION_RELEASE 4 /* for tweaks, bug-fixes, or development */
#define LZ4_VERSION_MINOR 10 /* for new (non-breaking) interface capabilities */
#define LZ4_VERSION_RELEASE 0 /* for tweaks, bug-fixes, or development */
#define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE)
@@ -144,23 +144,25 @@ LZ4LIB_API const char* LZ4_versionString (void); /**< library version string;
/*-************************************
* Tuning parameter
* Tuning memory usage
**************************************/
#define LZ4_MEMORY_USAGE_MIN 10
#define LZ4_MEMORY_USAGE_DEFAULT 14
#define LZ4_MEMORY_USAGE_MAX 20
/*!
* LZ4_MEMORY_USAGE :
* Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; )
* Increasing memory usage improves compression ratio, at the cost of speed.
* Can be selected at compile time, by setting LZ4_MEMORY_USAGE.
* Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB)
* Increasing memory usage improves compression ratio, generally at the cost of speed.
* Reduced memory usage may improve speed at the cost of ratio, thanks to better cache locality.
* Default value is 14, for 16KB, which nicely fits into Intel x86 L1 cache
* Default value is 14, for 16KB, which nicely fits into most L1 caches.
*/
#ifndef LZ4_MEMORY_USAGE
# define LZ4_MEMORY_USAGE LZ4_MEMORY_USAGE_DEFAULT
#endif
/* These are absolute limits, they should not be changed by users */
#define LZ4_MEMORY_USAGE_MIN 10
#define LZ4_MEMORY_USAGE_DEFAULT 14
#define LZ4_MEMORY_USAGE_MAX 20
#if (LZ4_MEMORY_USAGE < LZ4_MEMORY_USAGE_MIN)
# error "LZ4_MEMORY_USAGE is too small !"
#endif
@@ -191,7 +193,7 @@ LZ4LIB_API int LZ4_compress_default(const char* src, char* dst, int srcSize, int
/*! LZ4_decompress_safe() :
* @compressedSize : is the exact complete size of the compressed block.
* @dstCapacity : is the size of destination buffer (which must be already allocated),
* is an upper bound of decompressed size.
* presumed an upper bound of decompressed size.
* @return : the number of bytes decompressed into destination buffer (necessarily <= dstCapacity)
* If destination buffer is not large enough, decoding will stop and output an error code (negative value).
* If the source stream is detected malformed, the function will stop decoding and return a negative result.
@@ -243,23 +245,25 @@ LZ4LIB_API int LZ4_compress_fast (const char* src, char* dst, int srcSize, int d
LZ4LIB_API int LZ4_sizeofState(void);
LZ4LIB_API int LZ4_compress_fast_extState (void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration);
/*! LZ4_compress_destSize() :
* Reverse the logic : compresses as much data as possible from 'src' buffer
* into already allocated buffer 'dst', of size >= 'targetDestSize'.
* into already allocated buffer 'dst', of size >= 'dstCapacity'.
* This function either compresses the entire 'src' content into 'dst' if it's large enough,
* or fill 'dst' buffer completely with as much data as possible from 'src'.
* note: acceleration parameter is fixed to "default".
*
* *srcSizePtr : will be modified to indicate how many bytes where read from 'src' to fill 'dst'.
* *srcSizePtr : in+out parameter. Initially contains size of input.
* Will be modified to indicate how many bytes where read from 'src' to fill 'dst'.
* New value is necessarily <= input value.
* @return : Nb bytes written into 'dst' (necessarily <= targetDestSize)
* @return : Nb bytes written into 'dst' (necessarily <= dstCapacity)
* or 0 if compression fails.
*
* Note : from v1.8.2 to v1.9.1, this function had a bug (fixed in v1.9.2+):
* the produced compressed content could, in specific circumstances,
* require to be decompressed into a destination buffer larger
* by at least 1 byte than the content to decompress.
* Note : 'targetDstSize' must be >= 1, because it's the smallest valid lz4 payload.
*
* Note 2:from v1.8.2 to v1.9.1, this function had a bug (fixed in v1.9.2+):
* the produced compressed content could, in rare circumstances,
* require to be decompressed into a destination buffer
* larger by at least 1 byte than decompressesSize.
* If an application uses `LZ4_compress_destSize()`,
* it's highly recommended to update liblz4 to v1.9.2 or better.
* If this can't be done or ensured,
@@ -267,8 +271,7 @@ LZ4LIB_API int LZ4_compress_fast_extState (void* state, const char* src, char* d
* a dstCapacity which is > decompressedSize, by at least 1 byte.
* See https://github.com/lz4/lz4/issues/859 for details
*/
LZ4LIB_API int LZ4_compress_destSize (const char* src, char* dst, int* srcSizePtr, int targetDstSize);
LZ4LIB_API int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, int targetDstSize);
/*! LZ4_decompress_safe_partial() :
* Decompress an LZ4 compressed block, of size 'srcSize' at position 'src',
@@ -312,7 +315,7 @@ LZ4LIB_API int LZ4_decompress_safe_partial (const char* src, char* dst, int srcS
***********************************************/
typedef union LZ4_stream_u LZ4_stream_t; /* incomplete type (defined later) */
/**
/*!
Note about RC_INVOKED
- RC_INVOKED is predefined symbol of rc.exe (the resource compiler which is part of MSVC/Visual Studio).
@@ -362,13 +365,58 @@ LZ4LIB_API void LZ4_resetStream_fast (LZ4_stream_t* streamPtr);
* LZ4_loadDict() triggers a reset, so any previous data will be forgotten.
* The same dictionary will have to be loaded on decompression side for successful decoding.
* Dictionary are useful for better compression of small data (KB range).
* While LZ4 accept any input as dictionary,
* results are generally better when using Zstandard's Dictionary Builder.
* While LZ4 itself accepts any input as dictionary, dictionary efficiency is also a topic.
* When in doubt, employ the Zstandard's Dictionary Builder.
* Loading a size of 0 is allowed, and is the same as reset.
* @return : loaded dictionary size, in bytes (necessarily <= 64 KB)
* @return : loaded dictionary size, in bytes (note: only the last 64 KB are loaded)
*/
LZ4LIB_API int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, int dictSize);
/*! LZ4_loadDictSlow() : v1.10.0+
* Same as LZ4_loadDict(),
* but uses a bit more cpu to reference the dictionary content more thoroughly.
* This is expected to slightly improve compression ratio.
* The extra-cpu cost is likely worth it if the dictionary is re-used across multiple sessions.
* @return : loaded dictionary size, in bytes (note: only the last 64 KB are loaded)
*/
LZ4LIB_API int LZ4_loadDictSlow(LZ4_stream_t* streamPtr, const char* dictionary, int dictSize);
/*! LZ4_attach_dictionary() : stable since v1.10.0
*
* This allows efficient re-use of a static dictionary multiple times.
*
* Rather than re-loading the dictionary buffer into a working context before
* each compression, or copying a pre-loaded dictionary's LZ4_stream_t into a
* working LZ4_stream_t, this function introduces a no-copy setup mechanism,
* in which the working stream references @dictionaryStream in-place.
*
* Several assumptions are made about the state of @dictionaryStream.
* Currently, only states which have been prepared by LZ4_loadDict() or
* LZ4_loadDictSlow() should be expected to work.
*
* Alternatively, the provided @dictionaryStream may be NULL,
* in which case any existing dictionary stream is unset.
*
* If a dictionary is provided, it replaces any pre-existing stream history.
* The dictionary contents are the only history that can be referenced and
* logically immediately precede the data compressed in the first subsequent
* compression call.
*
* The dictionary will only remain attached to the working stream through the
* first compression call, at the end of which it is cleared.
* @dictionaryStream stream (and source buffer) must remain in-place / accessible / unchanged
* through the completion of the compression session.
*
* Note: there is no equivalent LZ4_attach_*() method on the decompression side
* because there is no initialization cost, hence no need to share the cost across multiple sessions.
* To decompress LZ4 blocks using dictionary, attached or not,
* just employ the regular LZ4_setStreamDecode() for streaming,
* or the stateless LZ4_decompress_safe_usingDict() for one-shot decompression.
*/
LZ4LIB_API void
LZ4_attach_dictionary(LZ4_stream_t* workingStream,
const LZ4_stream_t* dictionaryStream);
/*! LZ4_compress_fast_continue() :
* Compress 'src' content using data from previously compressed blocks, for better compression ratio.
* 'dst' buffer must be already allocated.
@@ -546,9 +594,9 @@ LZ4_decompress_safe_partial_usingDict(const char* src, char* dst,
#define LZ4_STATIC_3504398509
#ifdef LZ4_PUBLISH_STATIC_FUNCTIONS
#define LZ4LIB_STATIC_API LZ4LIB_API
# define LZ4LIB_STATIC_API LZ4LIB_API
#else
#define LZ4LIB_STATIC_API
# define LZ4LIB_STATIC_API
#endif
@@ -564,36 +612,11 @@ LZ4_decompress_safe_partial_usingDict(const char* src, char* dst,
*/
LZ4LIB_STATIC_API int LZ4_compress_fast_extState_fastReset (void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration);
/*! LZ4_attach_dictionary() :
* This is an experimental API that allows
* efficient use of a static dictionary many times.
*
* Rather than re-loading the dictionary buffer into a working context before
* each compression, or copying a pre-loaded dictionary's LZ4_stream_t into a
* working LZ4_stream_t, this function introduces a no-copy setup mechanism,
* in which the working stream references the dictionary stream in-place.
*
* Several assumptions are made about the state of the dictionary stream.
* Currently, only streams which have been prepared by LZ4_loadDict() should
* be expected to work.
*
* Alternatively, the provided dictionaryStream may be NULL,
* in which case any existing dictionary stream is unset.
*
* If a dictionary is provided, it replaces any pre-existing stream history.
* The dictionary contents are the only history that can be referenced and
* logically immediately precede the data compressed in the first subsequent
* compression call.
*
* The dictionary will only remain attached to the working stream through the
* first compression call, at the end of which it is cleared. The dictionary
* stream (and source buffer) must remain in-place / accessible / unchanged
* through the completion of the first compression call on the stream.
/*! LZ4_compress_destSize_extState() : introduced in v1.10.0
* Same as LZ4_compress_destSize(), but using an externally allocated state.
* Also: exposes @acceleration
*/
LZ4LIB_STATIC_API void
LZ4_attach_dictionary(LZ4_stream_t* workingStream,
const LZ4_stream_t* dictionaryStream);
int LZ4_compress_destSize_extState(void* state, const char* src, char* dst, int* srcSizePtr, int targetDstSize, int acceleration);
/*! In-place compression and decompression
*
@@ -677,10 +700,10 @@ LZ4_attach_dictionary(LZ4_stream_t* workingStream,
#if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
# include <stdint.h>
typedef int8_t LZ4_i8;
typedef uint8_t LZ4_byte;
typedef uint16_t LZ4_u16;
typedef uint32_t LZ4_u32;
typedef int8_t LZ4_i8;
typedef unsigned char LZ4_byte;
typedef uint16_t LZ4_u16;
typedef uint32_t LZ4_u32;
#else
typedef signed char LZ4_i8;
typedef unsigned char LZ4_byte;
@@ -705,7 +728,7 @@ struct LZ4_stream_t_internal {
/* Implicit padding to ensure structure is aligned */
};
#define LZ4_STREAM_MINSIZE ((1UL << LZ4_MEMORY_USAGE) + 32) /* static size, for inter-version compatibility */
#define LZ4_STREAM_MINSIZE ((1UL << (LZ4_MEMORY_USAGE)) + 32) /* static size, for inter-version compatibility */
union LZ4_stream_u {
char minStateSize[LZ4_STREAM_MINSIZE];
LZ4_stream_t_internal internal_donotuse;
@@ -726,7 +749,7 @@ union LZ4_stream_u {
* Note2: An LZ4_stream_t structure guarantees correct alignment and size.
* Note3: Before v1.9.0, use LZ4_resetStream() instead
**/
LZ4LIB_API LZ4_stream_t* LZ4_initStream (void* buffer, size_t size);
LZ4LIB_API LZ4_stream_t* LZ4_initStream (void* stateBuffer, size_t size);
/*! LZ4_streamDecode_t :
@@ -838,11 +861,12 @@ LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") LZ4LIB_API int LZ4
* But they may happen if input data is invalid (error or intentional tampering).
* As a consequence, use these functions in trusted environments with trusted data **only**.
*/
LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe() instead")
LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_partial() instead")
LZ4LIB_API int LZ4_decompress_fast (const char* src, char* dst, int originalSize);
LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_continue() instead")
LZ4_DEPRECATED("This function is deprecated and unsafe. Consider migrating towards LZ4_decompress_safe_continue() instead. "
"Note that the contract will change (requires block's compressed size, instead of decompressed size)")
LZ4LIB_API int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int originalSize);
LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_usingDict() instead")
LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_partial_usingDict() instead")
LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* src, char* dst, int originalSize, const char* dictStart, int dictSize);
/*! LZ4_resetStream() :

Some files were not shown because too many files have changed in this diff Show More