extlz4 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +43 -3
- data/contrib/lz4/CODING_STYLE +57 -0
- data/contrib/lz4/LICENSE +3 -2
- data/contrib/lz4/Makefile.inc +56 -30
- data/contrib/lz4/NEWS +46 -0
- data/contrib/lz4/README.md +17 -6
- data/contrib/lz4/SECURITY.md +17 -0
- data/contrib/lz4/build/README.md +4 -15
- data/contrib/lz4/build/VS2022/_build.bat +39 -0
- data/contrib/lz4/build/VS2022/_setup.bat +35 -0
- data/contrib/lz4/build/VS2022/_test.bat +38 -0
- data/contrib/lz4/build/VS2022/build-and-test-win32-debug.bat +26 -0
- data/contrib/lz4/build/VS2022/build-and-test-win32-release.bat +26 -0
- data/contrib/lz4/build/VS2022/build-and-test-x64-debug.bat +26 -0
- data/contrib/lz4/build/VS2022/build-and-test-x64-release.bat +26 -0
- data/contrib/lz4/build/{VS2017 → VS2022}/datagen/datagen.vcxproj +11 -7
- data/contrib/lz4/build/{VS2017 → VS2022}/frametest/frametest.vcxproj +4 -4
- data/contrib/lz4/build/{VS2017 → VS2022}/fullbench/fullbench.vcxproj +4 -4
- data/contrib/lz4/build/{VS2017 → VS2022}/fullbench-dll/fullbench-dll.vcxproj +4 -4
- data/contrib/lz4/build/{VS2017 → VS2022}/fuzzer/fuzzer.vcxproj +4 -4
- data/contrib/lz4/build/{VS2017 → VS2022}/liblz4/liblz4.vcxproj +4 -4
- data/contrib/lz4/build/{VS2010 → VS2022}/liblz4-dll/liblz4-dll.rc +1 -1
- data/contrib/lz4/build/{VS2017 → VS2022}/liblz4-dll/liblz4-dll.vcxproj +4 -4
- data/contrib/lz4/build/{VS2010 → VS2022}/lz4/lz4.rc +1 -1
- data/contrib/lz4/build/{VS2017 → VS2022}/lz4/lz4.vcxproj +33 -8
- data/contrib/lz4/build/{VS2017 → VS2022}/lz4.sln +5 -2
- data/contrib/lz4/build/cmake/CMakeLists.txt +133 -100
- data/contrib/lz4/build/cmake/lz4Config.cmake.in +2 -0
- data/contrib/lz4/build/meson/GetLz4LibraryVersion.py +39 -0
- data/contrib/lz4/build/meson/README.md +34 -0
- data/contrib/lz4/build/meson/meson/contrib/gen_manual/meson.build +42 -0
- data/contrib/lz4/build/meson/meson/contrib/meson.build +11 -0
- data/contrib/lz4/build/meson/meson/examples/meson.build +32 -0
- data/contrib/lz4/build/meson/meson/lib/meson.build +87 -0
- data/contrib/lz4/build/meson/meson/meson.build +135 -0
- data/contrib/lz4/build/meson/meson/ossfuzz/meson.build +35 -0
- data/contrib/lz4/build/meson/meson/programs/meson.build +91 -0
- data/contrib/lz4/build/meson/meson/tests/meson.build +162 -0
- data/contrib/lz4/build/meson/meson.build +31 -0
- data/contrib/lz4/build/meson/meson_options.txt +44 -0
- data/contrib/lz4/build/visual/README.md +5 -0
- data/contrib/lz4/build/visual/generate_solution.cmd +55 -0
- data/contrib/lz4/build/visual/generate_vs2015.cmd +3 -0
- data/contrib/lz4/build/visual/generate_vs2017.cmd +3 -0
- data/contrib/lz4/build/visual/generate_vs2019.cmd +3 -0
- data/contrib/lz4/build/visual/generate_vs2022.cmd +3 -0
- data/contrib/lz4/lib/LICENSE +1 -1
- data/contrib/lz4/lib/README.md +69 -13
- data/contrib/lz4/lib/liblz4-dll.rc.in +1 -1
- data/contrib/lz4/lib/liblz4.pc.in +3 -3
- data/contrib/lz4/lib/lz4.c +608 -274
- data/contrib/lz4/lib/lz4.h +212 -102
- data/contrib/lz4/lib/lz4file.c +341 -0
- data/contrib/lz4/lib/lz4file.h +93 -0
- data/contrib/lz4/lib/lz4frame.c +545 -308
- data/contrib/lz4/lib/lz4frame.h +252 -124
- data/contrib/lz4/lib/lz4frame_static.h +1 -1
- data/contrib/lz4/lib/lz4hc.c +1038 -461
- data/contrib/lz4/lib/lz4hc.h +57 -56
- data/contrib/lz4/lib/xxhash.c +21 -21
- data/contrib/lz4/ossfuzz/Makefile +1 -0
- data/contrib/lz4/ossfuzz/decompress_fuzzer.c +18 -2
- data/contrib/lz4/ossfuzz/fuzz_helpers.h +4 -3
- data/contrib/lz4/ossfuzz/round_trip_frame_uncompressed_fuzzer.c +134 -0
- data/contrib/lz4/ossfuzz/round_trip_fuzzer.c +66 -6
- data/ext/blockapi.c +19 -19
- data/ext/extlz4.h +12 -0
- data/ext/frameapi.c +26 -26
- data/ext/hashargs.c +7 -1
- metadata +47 -30
- data/contrib/lz4/build/VS2010/datagen/datagen.vcxproj +0 -169
- data/contrib/lz4/build/VS2010/frametest/frametest.vcxproj +0 -176
- data/contrib/lz4/build/VS2010/fullbench/fullbench.vcxproj +0 -176
- data/contrib/lz4/build/VS2010/fullbench-dll/fullbench-dll.vcxproj +0 -180
- data/contrib/lz4/build/VS2010/fuzzer/fuzzer.vcxproj +0 -173
- data/contrib/lz4/build/VS2010/liblz4/liblz4.vcxproj +0 -175
- data/contrib/lz4/build/VS2010/liblz4-dll/liblz4-dll.vcxproj +0 -179
- data/contrib/lz4/build/VS2010/lz4/lz4.vcxproj +0 -189
- data/contrib/lz4/build/VS2010/lz4.sln +0 -98
- data/contrib/lz4/build/VS2017/liblz4-dll/liblz4-dll.rc +0 -51
- data/contrib/lz4/build/VS2017/lz4/lz4.rc +0 -51
- data/contrib/lz4/tmp +0 -0
- data/contrib/lz4/tmpsparse +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baa3e15848383c3243e7c6d3dc09cc5a7f7094071d7591611cec509159823559
|
4
|
+
data.tar.gz: efdedcf6caa86e9710d775a630ae62595b5274db2096821a402681062c32ffe5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2b53623843be3b007391a21fe722f964f1287cf384de1e56f5d3839cb76e1f38c348c165e703f19a8ddc6467ce47d8f4cddf084ce7cae72df314295815a2ec7
|
7
|
+
data.tar.gz: 91fb074e801f634d0637635401dd6ee28c28f1d7400f88a6e92eef28d580c1f8eaa862c9d7c025f8d53ccd4a39957472308200ae23b06f5da1776e0ac08a3fd7
|
data/README.md
CHANGED
@@ -189,7 +189,7 @@ Ruby3 で追加された `Ractor` に対応しています。
|
|
189
189
|
- author: dearblue (mailto:dearblue@users.osdn.me)
|
190
190
|
- project page: <https://github.com/dearblue/ruby-extlz4>
|
191
191
|
- how to install: `gem install extlz4`
|
192
|
-
- version: 0.3.
|
192
|
+
- version: 0.3.5
|
193
193
|
- product quality: technical preview
|
194
194
|
- licensing: [2 clause BSD License](LICENSE)
|
195
195
|
- dependency gems: none
|
data/Rakefile
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
require "pathname"
|
3
3
|
require "rake/clean"
|
4
4
|
|
5
|
+
RUBYSET ||= (ENV["RUBYSET"] || "").split(",").yield_self { |me| me.empty? ? nil : me }
|
6
|
+
|
5
7
|
docnames = "{README,LICENSE,CHANGELOG,Changelog,HISTORY}"
|
6
8
|
doctypes = "{,.txt,.rd,.rdoc,.md,.markdown}"
|
7
9
|
cexttypes = "{c,C,cc,cxx,cpp,h,H,hh}"
|
@@ -35,6 +37,7 @@ GEMSTUB.executables.sort!
|
|
35
37
|
PACKAGENAME = "#{GEMSTUB.name}-#{GEMSTUB.version}"
|
36
38
|
GEMFILE = "#{PACKAGENAME}.gem"
|
37
39
|
GEMSPEC = "#{PACKAGENAME}.gemspec"
|
40
|
+
BUNDLER_GEMFILE = "Gemfile"
|
38
41
|
|
39
42
|
GEMSTUB.files += DOC + EXT + EXTCONF + BIN + LIB + SPEC + TEST + EXAMPLE + RAKEFILE + EXTRA
|
40
43
|
GEMSTUB.files.sort!
|
@@ -68,9 +71,7 @@ desc "build release package"
|
|
68
71
|
task :release => :all
|
69
72
|
|
70
73
|
unless EXTCONF.empty?
|
71
|
-
|
72
|
-
|
73
|
-
if RUBYSET.nil? || RUBYSET.empty?
|
74
|
+
if RUBYSET.nil?
|
74
75
|
$stderr.puts <<-EOS
|
75
76
|
#{__FILE__}:
|
76
77
|
|
|
@@ -142,6 +143,8 @@ ABORTED.
|
|
142
143
|
desc "build c-extension libraries"
|
143
144
|
task "sofiles" => SOFILES
|
144
145
|
|
146
|
+
task "test" => SOFILES
|
147
|
+
|
145
148
|
SOFILES_SET.each do |(ruby, soname, extconf)|
|
146
149
|
sodir = File.dirname(soname)
|
147
150
|
makefile = File.join(sodir, "Makefile")
|
@@ -183,6 +186,17 @@ task rspec: :all do
|
|
183
186
|
sh "rspec"
|
184
187
|
end
|
185
188
|
|
189
|
+
desc "test library"
|
190
|
+
task "test" do
|
191
|
+
(RUBYSET || ["ruby"]).each do |ruby|
|
192
|
+
lib = File.join(__dir__, "lib")
|
193
|
+
dir2 = __dir__.gsub(/[\[\{\*\?]/) { |m| "\\#{m}" }
|
194
|
+
Dir.glob(File.join(dir2, "test/**/test_*.rb")) do |test|
|
195
|
+
sh *%W(#{ruby} -I#{lib} #{test})
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
186
200
|
desc "build gem package"
|
187
201
|
task gem: GEMFILE
|
188
202
|
|
@@ -194,6 +208,9 @@ task "package-name" do
|
|
194
208
|
puts PACKAGENAME
|
195
209
|
end
|
196
210
|
|
211
|
+
desc "generate Gemfile for bundler"
|
212
|
+
task "gemfile" => BUNDLER_GEMFILE
|
213
|
+
|
197
214
|
file GEMFILE => DOC + EXT + EXTCONF + BIN + LIB + SPEC + TEST + EXAMPLE + RAKEFILE + [GEMSPEC] do
|
198
215
|
sh "gem build #{GEMSPEC}"
|
199
216
|
end
|
@@ -210,3 +227,26 @@ end
|
|
210
227
|
file GEMSPEC_TRYOUT => RAKEFILE do
|
211
228
|
File.write(GEMSPEC_TRYOUT, GEMSTUB_TRYOUT.to_ruby, mode: "wb")
|
212
229
|
end
|
230
|
+
|
231
|
+
file BUNDLER_GEMFILE => RAKEFILE do
|
232
|
+
File.write(BUNDLER_GEMFILE, <<~GemfileSource, mode: "wb")
|
233
|
+
#
|
234
|
+
# This file is auto generated by `rake gemfile`.
|
235
|
+
# THE CONTENT YOU CHANGED WILL BE LOST.
|
236
|
+
#
|
237
|
+
|
238
|
+
source "https://rubygems.org/"
|
239
|
+
|
240
|
+
group "default" do
|
241
|
+
#{GEMSTUB.runtime_dependencies.map { |e|
|
242
|
+
%( gem #{e.name.inspect}, #{e.requirements_list.map { |ee| ee.inspect }.join(", ")})
|
243
|
+
}.join("\n")}
|
244
|
+
end
|
245
|
+
|
246
|
+
group "development", "test" do
|
247
|
+
#{GEMSTUB.development_dependencies.map { |e|
|
248
|
+
%( gem #{e.name.inspect}, #{e.requirements_list.map { |ee| ee.inspect }.join(", ")})
|
249
|
+
}.join("\n")}
|
250
|
+
end
|
251
|
+
GemfileSource
|
252
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
LZ4 CODING STYLE
|
2
|
+
================
|
3
|
+
|
4
|
+
When contributing code and patches to the `LZ4` project, the following rules are expected to be followed for a successful merge.
|
5
|
+
|
6
|
+
|
7
|
+
Library
|
8
|
+
-------
|
9
|
+
|
10
|
+
The library's source code in `lib/` directory has a BSD 2-clause license.
|
11
|
+
It's designed to be integrated into 3rd party applications.
|
12
|
+
|
13
|
+
It adheres relatively strictly to vanilla `C90`, with the following exceptions:
|
14
|
+
- `long long` type is required, in order to support 64-bit values
|
15
|
+
- Variadic Macros are used for debug mode (but not required in release mode)
|
16
|
+
|
17
|
+
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.
|
18
|
+
|
19
|
+
The code is allowed to use more modern variants (C99 / C11 / C23) when useful
|
20
|
+
as long as it provides a clean C90 backup for older compilers.
|
21
|
+
For example, C99+ compilers will employ the `restrict` keyword, while `C90` ones will ignore it, thanks to conditional macros.
|
22
|
+
This ensures maximum portability across a wide range of systems.
|
23
|
+
|
24
|
+
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`.
|
25
|
+
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.
|
26
|
+
|
27
|
+
|
28
|
+
Command Line Interface
|
29
|
+
----------------------
|
30
|
+
|
31
|
+
The CLI executable's source code in `programs/` directory has a GPLv2+ license.
|
32
|
+
While it's designed to be portable and freely distributable, it's not meant to be integrated into 3rd party applications.
|
33
|
+
The license difference is meant to reflect that choice.
|
34
|
+
|
35
|
+
Similar to the library, the CLI adheres relatively strictly to vanilla `C90`, and features the same exceptions:
|
36
|
+
- `long long` requirement for 64-bit values
|
37
|
+
- Variadic Macros for console messages (now used all the time, not just debug mode)
|
38
|
+
|
39
|
+
The code can also use system-specific libraries and symbols (such as `posix` ones)
|
40
|
+
as long as it provides a backup for plain `C90` platforms.
|
41
|
+
It's even allowed to lose capabilities, as long as the CLI can be cleanly compiled on `C90`.
|
42
|
+
For example, systems without `<pthread>` support nor Completion Ports will just not feature multi-threading support, and run single threaded.
|
43
|
+
|
44
|
+
In the interest of build familiarity, the CLI source code also respects the same set of advanced warning flags as the library.
|
45
|
+
That being said, this last part is debatable and could deviate in the future.
|
46
|
+
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.
|
47
|
+
|
48
|
+
|
49
|
+
Others
|
50
|
+
------
|
51
|
+
|
52
|
+
The repository includes other directories with their own set of compilable projects, such as `tests/`, `examples/` and `contrib/`.
|
53
|
+
|
54
|
+
These repositories do not have to respect the same set of restrictions, and can employ a larger array of different languages.
|
55
|
+
For example, some tests employ `sh`, and others employ `python`.
|
56
|
+
|
57
|
+
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.
|
data/contrib/lz4/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
This repository uses 2 different licenses :
|
2
2
|
- all files in the `lib` directory use a BSD 2-Clause license
|
3
|
-
- all other files use a
|
3
|
+
- all other files use a GPL-2.0-or-later license, unless explicitly stated otherwise
|
4
4
|
|
5
5
|
Relevant license is reminded at the top of each source file,
|
6
6
|
and with presence of COPYING or LICENSE file in associated directories.
|
@@ -8,4 +8,5 @@ and with presence of COPYING or LICENSE file in associated directories.
|
|
8
8
|
This model is selected to emphasize that
|
9
9
|
files in the `lib` directory are designed to be included into 3rd party applications,
|
10
10
|
while all other files, in `programs`, `tests` or `examples`,
|
11
|
-
|
11
|
+
are intended to be used "as is", as part of their intended scenarios,
|
12
|
+
with no intention to support 3rd party integration use cases.
|
data/contrib/lz4/Makefile.inc
CHANGED
@@ -1,35 +1,63 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
# ################################################################
|
2
|
+
# LZ4 - Makefile common definitions
|
3
|
+
# Copyright (C) Yann Collet 2020
|
4
|
+
# All rights reserved.
|
5
|
+
#
|
6
|
+
# BSD license
|
7
|
+
# Redistribution and use in source and binary forms, with or without modification,
|
8
|
+
# are permitted provided that the following conditions are met:
|
9
|
+
#
|
10
|
+
# * Redistributions of source code must retain the above copyright notice, this
|
11
|
+
# list of conditions and the following disclaimer.
|
12
|
+
#
|
13
|
+
# * Redistributions in binary form must reproduce the above copyright notice, this
|
14
|
+
# list of conditions and the following disclaimer in the documentation and/or
|
15
|
+
# other materials provided with the distribution.
|
16
|
+
#
|
17
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
18
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
19
|
+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
20
|
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
21
|
+
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
22
|
+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
23
|
+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
24
|
+
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
26
|
+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
#
|
28
|
+
# You can contact the author at :
|
29
|
+
# - LZ4 source repository : https://github.com/lz4/lz4
|
30
|
+
# - LZ4 forum froup : https://groups.google.com/forum/#!forum/lz4c
|
31
|
+
# ################################################################
|
6
32
|
|
7
|
-
|
33
|
+
UNAME ?= uname
|
34
|
+
|
35
|
+
TARGET_OS ?= $(shell $(UNAME))
|
8
36
|
ifeq ($(TARGET_OS),)
|
9
37
|
TARGET_OS ?= $(OS)
|
10
38
|
endif
|
11
39
|
|
12
40
|
ifneq (,$(filter Windows%,$(TARGET_OS)))
|
13
|
-
|
14
|
-
LIBLZ4_EXP
|
15
|
-
WINBASED
|
41
|
+
LIBLZ4_NAME = liblz4-$(LIBVER_MAJOR)
|
42
|
+
LIBLZ4_EXP = liblz4.lib
|
43
|
+
WINBASED = yes
|
16
44
|
else
|
17
|
-
LIBLZ4_EXP
|
45
|
+
LIBLZ4_EXP = liblz4.dll.a
|
18
46
|
ifneq (,$(filter MINGW%,$(TARGET_OS)))
|
19
|
-
|
20
|
-
WINBASED
|
47
|
+
LIBLZ4_NAME = liblz4
|
48
|
+
WINBASED = yes
|
21
49
|
else
|
22
50
|
ifneq (,$(filter MSYS%,$(TARGET_OS)))
|
23
|
-
|
24
|
-
WINBASED
|
51
|
+
LIBLZ4_NAME = msys-lz4-$(LIBVER_MAJOR)
|
52
|
+
WINBASED = yes
|
25
53
|
else
|
26
54
|
ifneq (,$(filter CYGWIN%,$(TARGET_OS)))
|
27
|
-
|
28
|
-
WINBASED
|
55
|
+
LIBLZ4_NAME = cyglz4-$(LIBVER_MAJOR)
|
56
|
+
WINBASED = yes
|
29
57
|
else
|
30
|
-
|
31
|
-
WINBASED
|
32
|
-
EXT
|
58
|
+
LIBLZ4_NAME = liblz4
|
59
|
+
WINBASED = no
|
60
|
+
EXT =
|
33
61
|
endif
|
34
62
|
endif
|
35
63
|
endif
|
@@ -37,11 +65,13 @@ endif
|
|
37
65
|
|
38
66
|
ifeq ($(WINBASED),yes)
|
39
67
|
EXT = .exe
|
40
|
-
WINDRES
|
68
|
+
WINDRES ?= windres
|
41
69
|
endif
|
42
70
|
|
71
|
+
LIBLZ4 = $(LIBLZ4_NAME).$(SHARED_EXT_VER)
|
72
|
+
|
43
73
|
#determine if dev/nul based on host environment
|
44
|
-
ifneq (,$(filter MINGW% MSYS% CYGWIN%,$(shell
|
74
|
+
ifneq (,$(filter MINGW% MSYS% CYGWIN%,$(shell $(UNAME))))
|
45
75
|
VOID := /dev/null
|
46
76
|
else
|
47
77
|
ifneq (,$(filter Windows%,$(OS)))
|
@@ -51,32 +81,28 @@ VOID := /dev/null
|
|
51
81
|
endif
|
52
82
|
endif
|
53
83
|
|
54
|
-
ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku MidnightBSD MINGW% CYGWIN% MSYS%,$(shell
|
84
|
+
ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku MidnightBSD MINGW% CYGWIN% MSYS%,$(shell $(UNAME))))
|
55
85
|
POSIX_ENV = Yes
|
56
86
|
else
|
57
87
|
POSIX_ENV = No
|
58
88
|
endif
|
59
89
|
|
60
|
-
# Avoid symlinks when
|
90
|
+
# Avoid symlinks when targeting Windows or building on a Windows host
|
61
91
|
ifeq ($(WINBASED),yes)
|
62
|
-
LN_S = cp -p
|
63
92
|
LN_SF = cp -p
|
64
93
|
else
|
65
|
-
ifneq (,$(filter MINGW% MSYS% CYGWIN%,$(shell
|
66
|
-
LN_S = cp -p
|
94
|
+
ifneq (,$(filter MINGW% MSYS% CYGWIN%,$(shell $(UNAME))))
|
67
95
|
LN_SF = cp -p
|
68
96
|
else
|
69
97
|
ifneq (,$(filter Windows%,$(OS)))
|
70
|
-
LN_S = cp -p
|
71
98
|
LN_SF = cp -p
|
72
99
|
else
|
73
|
-
LN_S = ln -s
|
74
100
|
LN_SF = ln -sf
|
75
101
|
endif
|
76
102
|
endif
|
77
103
|
endif
|
78
104
|
|
79
|
-
ifneq (,$(filter $(shell
|
105
|
+
ifneq (,$(filter $(shell $(UNAME)),SunOS))
|
80
106
|
INSTALL ?= ginstall
|
81
107
|
else
|
82
108
|
INSTALL ?= install
|
@@ -84,4 +110,4 @@ endif
|
|
84
110
|
|
85
111
|
INSTALL_PROGRAM ?= $(INSTALL) -m 755
|
86
112
|
INSTALL_DATA ?= $(INSTALL) -m 644
|
87
|
-
|
113
|
+
MAKE_DIR ?= $(INSTALL) -d -m 755
|
data/contrib/lz4/NEWS
CHANGED
@@ -1,3 +1,49 @@
|
|
1
|
+
v1.10.0
|
2
|
+
cli : multithreading compression support: improves speed by X times threads allocated
|
3
|
+
cli : overlap decompression with i/o, improving speed by ~+60%
|
4
|
+
cli : support environment variables LZ4_CLEVEL and LZ4_NBWORKERS
|
5
|
+
cli : license of CLI more clearly labelled GPL-2.0-or-later
|
6
|
+
cli : fix: refuse to compress directories
|
7
|
+
cli : fix dictionary compression benchmark on multiple files
|
8
|
+
cli : change: no more implicit `stdout` (except when input is `stdin`)
|
9
|
+
lib : new level 2, offering mid-way performance (speed and compression)
|
10
|
+
lib : Improved lz4frame compression speed for small data (up to +160% at 1KB)
|
11
|
+
lib : Slightly faster (+5%) HC compression speed (levels 3-9), by @JunHe77
|
12
|
+
lib : dictionary compression support now in stable status
|
13
|
+
lib : lz4frame states can be safely reset and reused after a processing error (described by @QrczakMK)
|
14
|
+
lib : `lz4file` API improvements, by @vsolontsov-volant and @t-mat
|
15
|
+
lib : new experimental symbol `LZ4_compress_destSize_extState()`
|
16
|
+
build: cmake minimum version raised to 3.5
|
17
|
+
build: cmake improvements, by @foxeng, @Ohjurot, @LocalSpook, @teo-tsirpanis, @ur4t and @t-mat
|
18
|
+
build: meson scripts are now hosted into `build/` directory, by @eli-schwartz
|
19
|
+
build: meson improvements, by @tristan957
|
20
|
+
build: Visual Studio solutions generated by `cmake` via scripts
|
21
|
+
port : support for loongArch, risc-v, m68k, mips and sparc architectures
|
22
|
+
port : improved Visual Studio compatibility, by @t-mat
|
23
|
+
port : freestanding support improvements, by @t-mat
|
24
|
+
|
25
|
+
v1.9.4
|
26
|
+
perf : faster decoding speed (~+20%) on aarch64 platforms
|
27
|
+
perf : faster decoding speed (~+70%) for -BD4 setting in CLI
|
28
|
+
api : new function `LZ4_decompress_safe_partial_usingDict()` by @yawqi
|
29
|
+
api : lz4frame: ability to provide custom allocators at state creation
|
30
|
+
api : can skip checksum validation for improved decoding speed
|
31
|
+
api : new experimental unit `lz4file` for file i/o API, by @anjiahao1
|
32
|
+
api : new experimental function `LZ4F_uncompressedUpdate()`, by @alexmohr
|
33
|
+
cli : `--list` works on `stdin` input, by @Low-power
|
34
|
+
cli : `--no-crc` does not produce (compression) nor check (decompression) checksums
|
35
|
+
cli : fix: `--test` and `--list` produce an error code when parsing invalid input
|
36
|
+
cli : fix: `--test -m` does no longer create decompressed file artifacts
|
37
|
+
cli : fix: support skippable frames when passed via `stdin`, reported by @davidmankin
|
38
|
+
build: fix: Makefile respects CFLAGS directives passed via environment variable
|
39
|
+
build: `LZ4_FREESTANDING`, new build macro for freestanding environments, by @t-mat
|
40
|
+
build: `make` and `make test` are compatible with `-j` parallel run
|
41
|
+
build: AS/400 compatibility, by @jonrumsey
|
42
|
+
build: Solaris 10 compatibility, by @pekdon
|
43
|
+
build: MSVC 2022 support, by @t-mat
|
44
|
+
build: improved meson script, by @eli-schwartz
|
45
|
+
doc : Updated LZ4 block format, provide an "implementation notes" section
|
46
|
+
|
1
47
|
v1.9.3
|
2
48
|
perf: highly improved speed in kernel space, by @terrelln
|
3
49
|
perf: faster speed with Visual Studio, thanks to @wolfpld and @remittor
|
data/contrib/lz4/README.md
CHANGED
@@ -26,10 +26,8 @@ LZ4 library is provided as open-source software using BSD 2-Clause license.
|
|
26
26
|
|
27
27
|
|Branch |Status |
|
28
28
|
|------------|---------|
|
29
|
-
|dev | [![Build
|
29
|
+
|dev | [![Build status][AppveyorDevBadge]][AppveyorLink] |
|
30
30
|
|
31
|
-
[travisDevBadge]: https://travis-ci.org/lz4/lz4.svg?branch=dev "Continuous Integration test suite"
|
32
|
-
[travisLink]: https://travis-ci.org/lz4/lz4
|
33
31
|
[AppveyorDevBadge]: https://ci.appveyor.com/api/projects/status/github/lz4/lz4?branch=dev&svg=true "Windows test suite"
|
34
32
|
[AppveyorLink]: https://ci.appveyor.com/project/YannCollet/lz4-1lndh
|
35
33
|
|
@@ -62,7 +60,7 @@ in single-thread mode.
|
|
62
60
|
[zlib]: http://www.zlib.net/
|
63
61
|
[Zstandard]: http://www.zstd.net/
|
64
62
|
|
65
|
-
LZ4 is also compatible and optimized for x32 mode,
|
63
|
+
LZ4 is also compatible and optimized for x32 mode (`-mx32`),
|
66
64
|
for which it provides additional speed performance.
|
67
65
|
|
68
66
|
|
@@ -83,7 +81,7 @@ It is compatible with parallel builds (`-j#`).
|
|
83
81
|
[redirection]: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
|
84
82
|
[command redefinition]: https://www.gnu.org/prep/standards/html_node/Utilities-in-Makefiles.html
|
85
83
|
|
86
|
-
Building LZ4 - Using vcpkg
|
84
|
+
### Building LZ4 - Using vcpkg
|
87
85
|
|
88
86
|
You can download and install LZ4 using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
|
89
87
|
|
@@ -91,7 +89,7 @@ You can download and install LZ4 using the [vcpkg](https://github.com/Microsoft/
|
|
91
89
|
cd vcpkg
|
92
90
|
./bootstrap-vcpkg.sh
|
93
91
|
./vcpkg integrate install
|
94
|
-
vcpkg install lz4
|
92
|
+
./vcpkg.exe install lz4
|
95
93
|
|
96
94
|
The LZ4 port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
|
97
95
|
|
@@ -118,3 +116,16 @@ many contributors have created versions of lz4 in multiple languages
|
|
118
116
|
A list of known source ports is maintained on the [LZ4 Homepage].
|
119
117
|
|
120
118
|
[LZ4 Homepage]: http://www.lz4.org
|
119
|
+
|
120
|
+
### Packaging status
|
121
|
+
|
122
|
+
Most distributions are bundled with a package manager
|
123
|
+
which allows easy installation of both the `liblz4` library
|
124
|
+
and the `lz4` command line interface.
|
125
|
+
|
126
|
+
[](https://repology.org/project/lz4/versions)
|
127
|
+
|
128
|
+
|
129
|
+
### Special Thanks
|
130
|
+
|
131
|
+
- Takayuki Matsuoka, aka @t-mat, for exceptional first-class support throughout the lifetime of this project
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Security Policy
|
2
|
+
|
3
|
+
If you have discovered a security vulnerability in this project, please report it
|
4
|
+
privately. **Do not disclose it as a public issue.** This gives me time to work with you
|
5
|
+
to fix the issue before public exposure, reducing the chance that the exploit will be
|
6
|
+
used before a patch is released.
|
7
|
+
|
8
|
+
Please submit the report by filling out
|
9
|
+
[this form](https://github.com/lz4/lz4/security/advisories/new).
|
10
|
+
|
11
|
+
Please provide the following information in your report:
|
12
|
+
|
13
|
+
- A description of the vulnerability and its impact
|
14
|
+
- How to reproduce the issue
|
15
|
+
|
16
|
+
This project is maintained by a single maintainer on a reasonable-effort basis. As such,
|
17
|
+
I ask that you give me 90 days to work on a fix before public exposure.
|
data/contrib/lz4/build/README.md
CHANGED
@@ -5,23 +5,12 @@ Projects for various integrated development environments (IDE)
|
|
5
5
|
|
6
6
|
The following projects are included with the lz4 distribution:
|
7
7
|
- `cmake` - CMake project
|
8
|
-
- `
|
9
|
-
- `
|
8
|
+
- `meson` - Meson project
|
9
|
+
- `visual` - scripts to generate Visual Studio solutions from `cmake` script
|
10
|
+
- `VS2022` - Visual Studio 2022 solution - will soon be deprecated, prefer `visual` generators
|
10
11
|
|
11
12
|
|
12
|
-
####
|
13
|
-
|
14
|
-
1. Install Visual Studio e.g. VS 2015 Community Edition (it's free).
|
15
|
-
2. Download the latest version of lz4 from https://github.com/lz4/lz4/releases
|
16
|
-
3. Decompress ZIP archive.
|
17
|
-
4. Go to decompressed directory then to `build` then `VS2010` and open `lz4.sln`
|
18
|
-
5. Visual Studio will ask about converting VS2010 project to VS2015 and you should agree.
|
19
|
-
6. Change `Debug` to `Release` and if you have 64-bit Windows change also `Win32` to `x64`.
|
20
|
-
7. Press F7 on keyboard or select `BUILD` from the menu bar and choose `Build Solution`.
|
21
|
-
8. If compilation will be fine a compiled executable will be in `build\VS2010\bin\x64_Release\lz4.exe`
|
22
|
-
|
23
|
-
|
24
|
-
#### Projects available within lz4.sln
|
13
|
+
#### Projects available within VS2022\lz4.sln
|
25
14
|
|
26
15
|
The Visual Studio solution file `lz4.sln` contains many projects that will be compiled to the
|
27
16
|
`build\VS2010\bin\$(Platform)_$(Configuration)` directory. For example `lz4` set to `x64` and
|
@@ -0,0 +1,39 @@
|
|
1
|
+
set /a errorno=1
|
2
|
+
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "esc=%%E"
|
3
|
+
|
4
|
+
rem https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
|
5
|
+
|
6
|
+
set "sln=lz4.sln"
|
7
|
+
|
8
|
+
@rem set "Configuration=Debug"
|
9
|
+
@rem set "Platform=Win32"
|
10
|
+
|
11
|
+
set "BIN=.\bin\!Platform!_!Configuration!"
|
12
|
+
rmdir /S /Q "!BIN!" 2>nul
|
13
|
+
echo msbuild "%sln%" /p:Configuration=!Configuration! /p:Platform=!Platform!
|
14
|
+
msbuild "%sln%" ^
|
15
|
+
/nologo ^
|
16
|
+
/v:minimal ^
|
17
|
+
/m ^
|
18
|
+
/p:Configuration=!Configuration! ^
|
19
|
+
/p:Platform=!Platform! ^
|
20
|
+
/t:Clean,Build ^
|
21
|
+
|| goto :ERROR
|
22
|
+
|
23
|
+
if not exist "!BIN!\datagen.exe" ( echo FAIL: "!BIN!\datagen.exe" && goto :ERROR )
|
24
|
+
if not exist "!BIN!\frametest.exe" ( echo FAIL: "!BIN!\frametest.exe" && goto :ERROR )
|
25
|
+
if not exist "!BIN!\fullbench-dll.exe" ( echo FAIL: "!BIN!\fullbench-dll.exe" && goto :ERROR )
|
26
|
+
if not exist "!BIN!\fullbench.exe" ( echo FAIL: "!BIN!\fullbench.exe" && goto :ERROR )
|
27
|
+
if not exist "!BIN!\fuzzer.exe" ( echo FAIL: "!BIN!\fuzzer.exe" && goto :ERROR )
|
28
|
+
if not exist "!BIN!\liblz4.dll" ( echo FAIL: "!BIN!\liblz4.dll" && goto :ERROR )
|
29
|
+
if not exist "!BIN!\liblz4.lib" ( echo FAIL: "!BIN!\liblz4.lib" && goto :ERROR )
|
30
|
+
if not exist "!BIN!\liblz4_static.lib" ( echo FAIL: "!BIN!\liblz4_static.lib" && goto :ERROR )
|
31
|
+
if not exist "!BIN!\lz4.exe" ( echo FAIL: "!BIN!\lz4.exe" && goto :ERROR )
|
32
|
+
|
33
|
+
set /a errorno=0
|
34
|
+
goto :END
|
35
|
+
|
36
|
+
:ERROR
|
37
|
+
|
38
|
+
:END
|
39
|
+
exit /B %errorno%
|
@@ -0,0 +1,35 @@
|
|
1
|
+
set /a errorno=1
|
2
|
+
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "esc=%%E"
|
3
|
+
|
4
|
+
rem https://github.com/Microsoft/vswhere
|
5
|
+
rem https://github.com/microsoft/vswhere/wiki/Find-VC#batch
|
6
|
+
|
7
|
+
set "vswhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
|
8
|
+
if not exist "%vswhere%" (
|
9
|
+
echo Failed to find "vswhere.exe". Please install the latest version of Visual Studio.
|
10
|
+
goto :ERROR
|
11
|
+
)
|
12
|
+
|
13
|
+
set "InstallDir="
|
14
|
+
for /f "usebackq tokens=*" %%i in (
|
15
|
+
`"%vswhere%" -latest ^
|
16
|
+
-products * ^
|
17
|
+
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^
|
18
|
+
-property installationPath`
|
19
|
+
) do (
|
20
|
+
set "InstallDir=%%i"
|
21
|
+
)
|
22
|
+
if "%InstallDir%" == "" (
|
23
|
+
echo Failed to find Visual C++. Please install the latest version of Visual C++.
|
24
|
+
goto :ERROR
|
25
|
+
)
|
26
|
+
|
27
|
+
call "%InstallDir%\VC\Auxiliary\Build\vcvars64.bat" || goto :ERROR
|
28
|
+
|
29
|
+
set /a errorno=0
|
30
|
+
goto :END
|
31
|
+
|
32
|
+
:ERROR
|
33
|
+
|
34
|
+
:END
|
35
|
+
exit /B %errorno%
|
@@ -0,0 +1,38 @@
|
|
1
|
+
set /a errorno=1
|
2
|
+
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "esc=%%E"
|
3
|
+
|
4
|
+
@rem set "Configuration=Debug"
|
5
|
+
@rem set "Platform=Win32"
|
6
|
+
|
7
|
+
set "BIN=.\bin\!Platform!_!Configuration!"
|
8
|
+
set "TEST_FILES=..\..\tests\COPYING"
|
9
|
+
|
10
|
+
echo !BIN!\lz4 -h
|
11
|
+
!BIN!\lz4 -h || goto :ERROR
|
12
|
+
|
13
|
+
echo !BIN!\lz4 -i1b
|
14
|
+
!BIN!\lz4 -i1b || goto :ERROR
|
15
|
+
|
16
|
+
echo !BIN!\lz4 -i1b5
|
17
|
+
!BIN!\lz4 -i1b5 || goto :ERROR
|
18
|
+
|
19
|
+
echo !BIN!\lz4 -i1b10
|
20
|
+
!BIN!\lz4 -i1b10 || goto :ERROR
|
21
|
+
|
22
|
+
echo !BIN!\lz4 -i1b15
|
23
|
+
!BIN!\lz4 -i1b15 || goto :ERROR
|
24
|
+
|
25
|
+
echo fullbench
|
26
|
+
!BIN!\fullbench.exe --no-prompt -i1 %TEST_FILES% || goto :ERROR
|
27
|
+
|
28
|
+
echo fuzzer
|
29
|
+
!BIN!\fuzzer.exe -v -T30s || goto :ERROR
|
30
|
+
|
31
|
+
|
32
|
+
set /a errorno=0
|
33
|
+
goto :END
|
34
|
+
|
35
|
+
:ERROR
|
36
|
+
|
37
|
+
:END
|
38
|
+
exit /B %errorno%
|
@@ -0,0 +1,26 @@
|
|
1
|
+
@setlocal enabledelayedexpansion
|
2
|
+
@echo off
|
3
|
+
set /a errorno=1
|
4
|
+
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "esc=%%E"
|
5
|
+
|
6
|
+
call _setup.bat || goto :ERROR
|
7
|
+
|
8
|
+
set "Configuration=Debug"
|
9
|
+
set "Platform=Win32"
|
10
|
+
|
11
|
+
call _build.bat || goto :ERROR
|
12
|
+
call _test.bat || goto :ERROR
|
13
|
+
|
14
|
+
|
15
|
+
echo Build Status -%esc%[92m SUCCEEDED %esc%[0m
|
16
|
+
set /a errorno=0
|
17
|
+
goto :END
|
18
|
+
|
19
|
+
|
20
|
+
:ERROR
|
21
|
+
echo Abort by error.
|
22
|
+
echo Build Status -%esc%[91m ERROR %esc%[0m
|
23
|
+
|
24
|
+
|
25
|
+
:END
|
26
|
+
exit /B %errorno%
|
@@ -0,0 +1,26 @@
|
|
1
|
+
@setlocal enabledelayedexpansion
|
2
|
+
@echo off
|
3
|
+
set /a errorno=1
|
4
|
+
for /F "delims=#" %%E in ('"prompt #$E# & for %%E in (1) do rem"') do set "esc=%%E"
|
5
|
+
|
6
|
+
call _setup.bat || goto :ERROR
|
7
|
+
|
8
|
+
set "Configuration=Release"
|
9
|
+
set "Platform=Win32"
|
10
|
+
|
11
|
+
call _build.bat || goto :ERROR
|
12
|
+
call _test.bat || goto :ERROR
|
13
|
+
|
14
|
+
|
15
|
+
echo Build Status -%esc%[92m SUCCEEDED %esc%[0m
|
16
|
+
set /a errorno=0
|
17
|
+
goto :END
|
18
|
+
|
19
|
+
|
20
|
+
:ERROR
|
21
|
+
echo Abort by error.
|
22
|
+
echo Build Status -%esc%[91m ERROR %esc%[0m
|
23
|
+
|
24
|
+
|
25
|
+
:END
|
26
|
+
exit /B %errorno%
|