Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 380a8d8

Browse filesBrowse files
hybristtargos
authored andcommitted
deps,tools: add zstd 1.5.6
PR-URL: #52100 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent d230bc3 commit 380a8d8
Copy full SHA for 380a8d8

File tree

Expand file treeCollapse file tree

112 files changed

+79826
-0
lines changed
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

112 files changed

+79826
-0
lines changed
Open diff view settings
Collapse file

‎LICENSE‎

Copy file name to clipboardExpand all lines: LICENSE
+34Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,6 +2384,40 @@ The externally maintained libraries used by Node.js are:
23842384
THE SOFTWARE.
23852385
"""
23862386

2387+
- zstd, located at deps/zstd, is licensed as follows:
2388+
"""
2389+
BSD License
2390+
2391+
For Zstandard software
2392+
2393+
Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
2394+
2395+
Redistribution and use in source and binary forms, with or without modification,
2396+
are permitted provided that the following conditions are met:
2397+
2398+
* Redistributions of source code must retain the above copyright notice, this
2399+
list of conditions and the following disclaimer.
2400+
2401+
* Redistributions in binary form must reproduce the above copyright notice,
2402+
this list of conditions and the following disclaimer in the documentation
2403+
and/or other materials provided with the distribution.
2404+
2405+
* Neither the name Facebook, nor Meta, nor the names of its contributors may
2406+
be used to endorse or promote products derived from this software without
2407+
specific prior written permission.
2408+
2409+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2410+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2411+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2412+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
2413+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2414+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2415+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2416+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2417+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2418+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2419+
"""
2420+
23872421
- HdrHistogram, located at deps/histogram, is licensed as follows:
23882422
"""
23892423
The code in this repository code was Written by Gil Tene, Michael Barker,
Collapse file

‎configure.py‎

Copy file name to clipboardExpand all lines: configure.py
+24Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,29 @@
574574
dest='shared_sqlite_libpath',
575575
help='a directory to search for the shared sqlite DLL')
576576

577+
shared_optgroup.add_argument('--shared-zstd',
578+
action='store_true',
579+
dest='shared_zstd',
580+
default=None,
581+
help='link to a shared zstd DLL instead of static linking')
582+
583+
shared_optgroup.add_argument('--shared-zstd-includes',
584+
action='store',
585+
dest='shared_zstd_includes',
586+
help='directory containing zstd header files')
587+
588+
shared_optgroup.add_argument('--shared-zstd-libname',
589+
action='store',
590+
dest='shared_zstd_libname',
591+
default='zstd',
592+
help='alternative lib name to link to [default: %(default)s]')
593+
594+
shared_optgroup.add_argument('--shared-zstd-libpath',
595+
action='store',
596+
dest='shared_zstd_libpath',
597+
help='a directory to search for the shared zstd DLL')
598+
599+
parser.add_argument_group(shared_optgroup)
577600

578601
for builtin in shareable_builtins:
579602
builtin_id = 'shared_builtin_' + builtin + '_path'
@@ -2227,6 +2250,7 @@ def make_bin_override():
22272250
configure_library('ngtcp2', output, pkgname='libngtcp2')
22282251
configure_library('sqlite', output, pkgname='sqlite3')
22292252
configure_library('uvwasi', output, pkgname='libuvwasi')
2253+
configure_library('zstd', output)
22302254
configure_v8(output, configurations)
22312255
configure_openssl(output)
22322256
configure_intl(output)
Collapse file

‎deps/zstd/BUILD.gn‎

Copy file name to clipboard
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
##############################################################################
2+
# #
3+
# DO NOT EDIT THIS FILE! #
4+
# #
5+
##############################################################################
6+
7+
# This file is used by GN for building, which is NOT the build system used for
8+
# building official binaries.
9+
# Please modify the gyp files if you are making changes to build system.
10+
11+
import("unofficial.gni")
12+
13+
zstd_gn_build("zstd") {
14+
}
Collapse file

‎deps/zstd/LICENSE‎

Copy file name to clipboard
+30Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
BSD License
2+
3+
For Zstandard software
4+
5+
Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
6+
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,
14+
this list of conditions and the following disclaimer in the documentation
15+
and/or other materials provided with the distribution.
16+
17+
* Neither the name Facebook, nor Meta, nor the names of its contributors may
18+
be used to endorse or promote products derived from this software without
19+
specific prior written permission.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Collapse file

‎deps/zstd/lib/.gitignore‎

Copy file name to clipboard
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# make install artefact
2+
libzstd.pc
3+
libzstd-nomt
Collapse file

‎deps/zstd/lib/BUCK‎

Copy file name to clipboard
+232Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
cxx_library(
2+
name='zstd',
3+
header_namespace='',
4+
exported_headers=['zstd.h'],
5+
visibility=['PUBLIC'],
6+
deps=[
7+
':common',
8+
':compress',
9+
':decompress',
10+
':deprecated',
11+
],
12+
)
13+
14+
cxx_library(
15+
name='compress',
16+
header_namespace='',
17+
visibility=['PUBLIC'],
18+
exported_headers=subdir_glob([
19+
('compress', 'zstd*.h'),
20+
]),
21+
srcs=glob(['compress/zstd*.c', 'compress/hist.c']),
22+
deps=[':common'],
23+
)
24+
25+
cxx_library(
26+
name='decompress',
27+
header_namespace='',
28+
visibility=['PUBLIC'],
29+
headers=subdir_glob([
30+
('decompress', '*_impl.h'),
31+
]),
32+
srcs=glob(['decompress/zstd*.c']),
33+
deps=[
34+
':common',
35+
':legacy',
36+
],
37+
)
38+
39+
cxx_library(
40+
name='deprecated',
41+
header_namespace='',
42+
visibility=['PUBLIC'],
43+
exported_headers=subdir_glob([
44+
('deprecated', '*.h'),
45+
]),
46+
srcs=glob(['deprecated/*.c']),
47+
deps=[':common'],
48+
)
49+
50+
cxx_library(
51+
name='legacy',
52+
header_namespace='',
53+
visibility=['PUBLIC'],
54+
exported_headers=subdir_glob([
55+
('legacy', '*.h'),
56+
]),
57+
srcs=glob(['legacy/*.c']),
58+
deps=[':common'],
59+
exported_preprocessor_flags=[
60+
'-DZSTD_LEGACY_SUPPORT=4',
61+
],
62+
)
63+
64+
cxx_library(
65+
name='zdict',
66+
header_namespace='',
67+
visibility=['PUBLIC'],
68+
exported_headers=['zdict.h'],
69+
headers=subdir_glob([
70+
('dictBuilder', 'divsufsort.h'),
71+
('dictBuilder', 'cover.h'),
72+
]),
73+
srcs=glob(['dictBuilder/*.c']),
74+
deps=[':common'],
75+
)
76+
77+
cxx_library(
78+
name='compiler',
79+
header_namespace='',
80+
visibility=['PUBLIC'],
81+
exported_headers=subdir_glob([
82+
('common', 'compiler.h'),
83+
]),
84+
)
85+
86+
cxx_library(
87+
name='cpu',
88+
header_namespace='',
89+
visibility=['PUBLIC'],
90+
exported_headers=subdir_glob([
91+
('common', 'cpu.h'),
92+
]),
93+
)
94+
95+
cxx_library(
96+
name='bitstream',
97+
header_namespace='',
98+
visibility=['PUBLIC'],
99+
exported_headers=subdir_glob([
100+
('common', 'bitstream.h'),
101+
]),
102+
)
103+
104+
cxx_library(
105+
name='entropy',
106+
header_namespace='',
107+
visibility=['PUBLIC'],
108+
exported_headers=subdir_glob([
109+
('common', 'fse.h'),
110+
('common', 'huf.h'),
111+
]),
112+
srcs=[
113+
'common/entropy_common.c',
114+
'common/fse_decompress.c',
115+
'compress/fse_compress.c',
116+
'compress/huf_compress.c',
117+
'decompress/huf_decompress.c',
118+
],
119+
deps=[
120+
':debug',
121+
':bitstream',
122+
':compiler',
123+
':errors',
124+
':mem',
125+
],
126+
)
127+
128+
cxx_library(
129+
name='errors',
130+
header_namespace='',
131+
visibility=['PUBLIC'],
132+
exported_headers=[
133+
'zstd_errors.h',
134+
'common/error_private.h',
135+
]
136+
srcs=['common/error_private.c'],
137+
)
138+
139+
cxx_library(
140+
name='mem',
141+
header_namespace='',
142+
visibility=['PUBLIC'],
143+
exported_headers=subdir_glob([
144+
('common', 'mem.h'),
145+
]),
146+
)
147+
148+
cxx_library(
149+
name='pool',
150+
header_namespace='',
151+
visibility=['PUBLIC'],
152+
exported_headers=subdir_glob([
153+
('common', 'pool.h'),
154+
]),
155+
srcs=['common/pool.c'],
156+
deps=[
157+
':threading',
158+
':zstd_common',
159+
],
160+
)
161+
162+
cxx_library(
163+
name='threading',
164+
header_namespace='',
165+
visibility=['PUBLIC'],
166+
exported_headers=subdir_glob([
167+
('common', 'threading.h'),
168+
]),
169+
srcs=['common/threading.c'],
170+
exported_preprocessor_flags=[
171+
'-DZSTD_MULTITHREAD',
172+
],
173+
exported_linker_flags=[
174+
'-pthread',
175+
],
176+
)
177+
178+
cxx_library(
179+
name='xxhash',
180+
header_namespace='',
181+
visibility=['PUBLIC'],
182+
exported_headers=subdir_glob([
183+
('common', 'xxhash.h'),
184+
]),
185+
srcs=['common/xxhash.c'],
186+
exported_preprocessor_flags=[
187+
'-DXXH_NAMESPACE=ZSTD_',
188+
],
189+
)
190+
191+
cxx_library(
192+
name='zstd_common',
193+
header_namespace='',
194+
visibility=['PUBLIC'],
195+
exported_headers=subdir_glob([
196+
('', 'zstd.h'),
197+
('common', 'zstd_internal.h'),
198+
]),
199+
srcs=['common/zstd_common.c'],
200+
deps=[
201+
':compiler',
202+
':errors',
203+
':mem',
204+
],
205+
)
206+
207+
cxx_library(
208+
name='debug',
209+
header_namespace='',
210+
visibility=['PUBLIC'],
211+
exported_headers=subdir_glob([
212+
('common', 'debug.h'),
213+
]),
214+
srcs=['common/debug.c'],
215+
)
216+
217+
cxx_library(
218+
name='common',
219+
deps=[
220+
':debug',
221+
':bitstream',
222+
':compiler',
223+
':cpu',
224+
':entropy',
225+
':errors',
226+
':mem',
227+
':pool',
228+
':threading',
229+
':xxhash',
230+
':zstd_common',
231+
]
232+
)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.