zstd-ruby 1.5.2.3 → 1.5.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/ext/zstdruby/libzstd/common/bits.h +175 -0
  4. data/ext/zstdruby/libzstd/common/bitstream.h +18 -59
  5. data/ext/zstdruby/libzstd/common/compiler.h +22 -3
  6. data/ext/zstdruby/libzstd/common/cpu.h +1 -1
  7. data/ext/zstdruby/libzstd/common/debug.c +1 -1
  8. data/ext/zstdruby/libzstd/common/debug.h +1 -1
  9. data/ext/zstdruby/libzstd/common/entropy_common.c +12 -40
  10. data/ext/zstdruby/libzstd/common/error_private.c +9 -2
  11. data/ext/zstdruby/libzstd/common/error_private.h +1 -1
  12. data/ext/zstdruby/libzstd/common/fse.h +5 -83
  13. data/ext/zstdruby/libzstd/common/fse_decompress.c +7 -99
  14. data/ext/zstdruby/libzstd/common/huf.h +65 -156
  15. data/ext/zstdruby/libzstd/common/mem.h +39 -46
  16. data/ext/zstdruby/libzstd/common/pool.c +26 -10
  17. data/ext/zstdruby/libzstd/common/pool.h +7 -1
  18. data/ext/zstdruby/libzstd/common/portability_macros.h +22 -3
  19. data/ext/zstdruby/libzstd/common/threading.c +68 -14
  20. data/ext/zstdruby/libzstd/common/threading.h +5 -10
  21. data/ext/zstdruby/libzstd/common/xxhash.c +2 -2
  22. data/ext/zstdruby/libzstd/common/xxhash.h +8 -8
  23. data/ext/zstdruby/libzstd/common/zstd_common.c +1 -1
  24. data/ext/zstdruby/libzstd/common/zstd_deps.h +1 -1
  25. data/ext/zstdruby/libzstd/common/zstd_internal.h +17 -113
  26. data/ext/zstdruby/libzstd/common/zstd_trace.h +3 -3
  27. data/ext/zstdruby/libzstd/compress/clevels.h +1 -1
  28. data/ext/zstdruby/libzstd/compress/fse_compress.c +7 -124
  29. data/ext/zstdruby/libzstd/compress/hist.c +1 -1
  30. data/ext/zstdruby/libzstd/compress/hist.h +1 -1
  31. data/ext/zstdruby/libzstd/compress/huf_compress.c +234 -169
  32. data/ext/zstdruby/libzstd/compress/zstd_compress.c +1055 -455
  33. data/ext/zstdruby/libzstd/compress/zstd_compress_internal.h +165 -145
  34. data/ext/zstdruby/libzstd/compress/zstd_compress_literals.c +115 -39
  35. data/ext/zstdruby/libzstd/compress/zstd_compress_literals.h +16 -8
  36. data/ext/zstdruby/libzstd/compress/zstd_compress_sequences.c +3 -3
  37. data/ext/zstdruby/libzstd/compress/zstd_compress_sequences.h +1 -1
  38. data/ext/zstdruby/libzstd/compress/zstd_compress_superblock.c +25 -21
  39. data/ext/zstdruby/libzstd/compress/zstd_compress_superblock.h +1 -1
  40. data/ext/zstdruby/libzstd/compress/zstd_cwksp.h +5 -3
  41. data/ext/zstdruby/libzstd/compress/zstd_double_fast.c +95 -33
  42. data/ext/zstdruby/libzstd/compress/zstd_double_fast.h +3 -2
  43. data/ext/zstdruby/libzstd/compress/zstd_fast.c +433 -148
  44. data/ext/zstdruby/libzstd/compress/zstd_fast.h +3 -2
  45. data/ext/zstdruby/libzstd/compress/zstd_lazy.c +306 -283
  46. data/ext/zstdruby/libzstd/compress/zstd_lazy.h +4 -2
  47. data/ext/zstdruby/libzstd/compress/zstd_ldm.c +5 -5
  48. data/ext/zstdruby/libzstd/compress/zstd_ldm.h +1 -1
  49. data/ext/zstdruby/libzstd/compress/zstd_ldm_geartab.h +1 -1
  50. data/ext/zstdruby/libzstd/compress/zstd_opt.c +104 -80
  51. data/ext/zstdruby/libzstd/compress/zstd_opt.h +1 -1
  52. data/ext/zstdruby/libzstd/compress/zstdmt_compress.c +12 -5
  53. data/ext/zstdruby/libzstd/compress/zstdmt_compress.h +1 -1
  54. data/ext/zstdruby/libzstd/decompress/huf_decompress.c +434 -441
  55. data/ext/zstdruby/libzstd/decompress/huf_decompress_amd64.S +30 -39
  56. data/ext/zstdruby/libzstd/decompress/zstd_ddict.c +3 -4
  57. data/ext/zstdruby/libzstd/decompress/zstd_ddict.h +1 -1
  58. data/ext/zstdruby/libzstd/decompress/zstd_decompress.c +164 -42
  59. data/ext/zstdruby/libzstd/decompress/zstd_decompress_block.c +186 -65
  60. data/ext/zstdruby/libzstd/decompress/zstd_decompress_block.h +1 -1
  61. data/ext/zstdruby/libzstd/decompress/zstd_decompress_internal.h +4 -2
  62. data/ext/zstdruby/libzstd/dictBuilder/cover.c +19 -15
  63. data/ext/zstdruby/libzstd/dictBuilder/cover.h +1 -1
  64. data/ext/zstdruby/libzstd/dictBuilder/fastcover.c +2 -2
  65. data/ext/zstdruby/libzstd/dictBuilder/zdict.c +9 -87
  66. data/ext/zstdruby/libzstd/zdict.h +53 -31
  67. data/ext/zstdruby/libzstd/zstd.h +489 -90
  68. data/ext/zstdruby/libzstd/zstd_errors.h +27 -8
  69. data/ext/zstdruby/main.c +4 -0
  70. data/lib/zstd-ruby/version.rb +1 -1
  71. metadata +7 -6
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) Yann Collet, Facebook, Inc.
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
3
  * All rights reserved.
4
4
  *
5
5
  * This source code is licensed under both the BSD-style license (found in the
@@ -20,19 +20,31 @@ extern "C" {
20
20
 
21
21
 
22
22
  /* ===== ZSTDERRORLIB_API : control library symbols visibility ===== */
23
- #ifndef ZSTDERRORLIB_VISIBILITY
24
- # if defined(__GNUC__) && (__GNUC__ >= 4)
25
- # define ZSTDERRORLIB_VISIBILITY __attribute__ ((visibility ("default")))
23
+ #ifndef ZSTDERRORLIB_VISIBLE
24
+ /* Backwards compatibility with old macro name */
25
+ # ifdef ZSTDERRORLIB_VISIBILITY
26
+ # define ZSTDERRORLIB_VISIBLE ZSTDERRORLIB_VISIBILITY
27
+ # elif defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
28
+ # define ZSTDERRORLIB_VISIBLE __attribute__ ((visibility ("default")))
26
29
  # else
27
- # define ZSTDERRORLIB_VISIBILITY
30
+ # define ZSTDERRORLIB_VISIBLE
28
31
  # endif
29
32
  #endif
33
+
34
+ #ifndef ZSTDERRORLIB_HIDDEN
35
+ # if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
36
+ # define ZSTDERRORLIB_HIDDEN __attribute__ ((visibility ("hidden")))
37
+ # else
38
+ # define ZSTDERRORLIB_HIDDEN
39
+ # endif
40
+ #endif
41
+
30
42
  #if defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
31
- # define ZSTDERRORLIB_API __declspec(dllexport) ZSTDERRORLIB_VISIBILITY
43
+ # define ZSTDERRORLIB_API __declspec(dllexport) ZSTDERRORLIB_VISIBLE
32
44
  #elif defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)
33
- # define ZSTDERRORLIB_API __declspec(dllimport) ZSTDERRORLIB_VISIBILITY /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/
45
+ # define ZSTDERRORLIB_API __declspec(dllimport) ZSTDERRORLIB_VISIBLE /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/
34
46
  #else
35
- # define ZSTDERRORLIB_API ZSTDERRORLIB_VISIBILITY
47
+ # define ZSTDERRORLIB_API ZSTDERRORLIB_VISIBLE
36
48
  #endif
37
49
 
38
50
  /*-*********************************************
@@ -58,14 +70,17 @@ typedef enum {
58
70
  ZSTD_error_frameParameter_windowTooLarge = 16,
59
71
  ZSTD_error_corruption_detected = 20,
60
72
  ZSTD_error_checksum_wrong = 22,
73
+ ZSTD_error_literals_headerWrong = 24,
61
74
  ZSTD_error_dictionary_corrupted = 30,
62
75
  ZSTD_error_dictionary_wrong = 32,
63
76
  ZSTD_error_dictionaryCreation_failed = 34,
64
77
  ZSTD_error_parameter_unsupported = 40,
78
+ ZSTD_error_parameter_combination_unsupported = 41,
65
79
  ZSTD_error_parameter_outOfBound = 42,
66
80
  ZSTD_error_tableLog_tooLarge = 44,
67
81
  ZSTD_error_maxSymbolValue_tooLarge = 46,
68
82
  ZSTD_error_maxSymbolValue_tooSmall = 48,
83
+ ZSTD_error_stabilityCondition_notRespected = 50,
69
84
  ZSTD_error_stage_wrong = 60,
70
85
  ZSTD_error_init_missing = 62,
71
86
  ZSTD_error_memory_allocation = 64,
@@ -73,11 +88,15 @@ typedef enum {
73
88
  ZSTD_error_dstSize_tooSmall = 70,
74
89
  ZSTD_error_srcSize_wrong = 72,
75
90
  ZSTD_error_dstBuffer_null = 74,
91
+ ZSTD_error_noForwardProgress_destFull = 80,
92
+ ZSTD_error_noForwardProgress_inputEmpty = 82,
76
93
  /* following error codes are __NOT STABLE__, they can be removed or changed in future versions */
77
94
  ZSTD_error_frameIndex_tooLarge = 100,
78
95
  ZSTD_error_seekableIO = 102,
79
96
  ZSTD_error_dstBuffer_wrong = 104,
80
97
  ZSTD_error_srcBuffer_wrong = 105,
98
+ ZSTD_error_sequenceProducer_failed = 106,
99
+ ZSTD_error_externalSequences_invalid = 107,
81
100
  ZSTD_error_maxCode = 120 /* never EVER use this value directly, it can change in future versions! Use ZSTD_isError() instead */
82
101
  } ZSTD_ErrorCode;
83
102
 
data/ext/zstdruby/main.c CHANGED
@@ -7,6 +7,10 @@ void zstd_ruby_streaming_decompress_init(void);
7
7
  void
8
8
  Init_zstdruby(void)
9
9
  {
10
+ #ifdef HAVE_RB_EXT_RACTOR_SAFE
11
+ rb_ext_ractor_safe(true);
12
+ #endif
13
+
10
14
  rb_mZstd = rb_define_module("Zstd");
11
15
  zstd_ruby_init();
12
16
  zstd_ruby_streaming_compress_init();
@@ -1,3 +1,3 @@
1
1
  module Zstd
2
- VERSION = "1.5.2.3"
2
+ VERSION = "1.5.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zstd-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2.3
4
+ version: 1.5.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SpringMT
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-23 00:00:00.000000000 Z
11
+ date: 2023-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -87,6 +87,7 @@ files:
87
87
  - bin/setup
88
88
  - ext/zstdruby/common.h
89
89
  - ext/zstdruby/extconf.rb
90
+ - ext/zstdruby/libzstd/common/bits.h
90
91
  - ext/zstdruby/libzstd/common/bitstream.h
91
92
  - ext/zstdruby/libzstd/common/compiler.h
92
93
  - ext/zstdruby/libzstd/common/cpu.h
@@ -166,7 +167,7 @@ homepage: https://github.com/SpringMT/zstd-ruby
166
167
  licenses:
167
168
  - MIT
168
169
  metadata: {}
169
- post_install_message:
170
+ post_install_message:
170
171
  rdoc_options: []
171
172
  require_paths:
172
173
  - lib
@@ -181,8 +182,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
182
  - !ruby/object:Gem::Version
182
183
  version: '0'
183
184
  requirements: []
184
- rubygems_version: 3.1.6
185
- signing_key:
185
+ rubygems_version: 3.3.26
186
+ signing_key:
186
187
  specification_version: 4
187
188
  summary: Ruby binding for zstd(Zstandard - Fast real-time compression algorithm)
188
189
  test_files: []