zstd-ruby 1.5.5.0 → 1.5.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/README.md +2 -2
- data/ext/zstdruby/extconf.rb +2 -0
- data/ext/zstdruby/libzstd/common/allocations.h +1 -1
- data/ext/zstdruby/libzstd/common/bitstream.h +49 -29
- data/ext/zstdruby/libzstd/common/compiler.h +114 -22
- data/ext/zstdruby/libzstd/common/cpu.h +36 -0
- data/ext/zstdruby/libzstd/common/debug.c +6 -0
- data/ext/zstdruby/libzstd/common/debug.h +20 -11
- data/ext/zstdruby/libzstd/common/error_private.h +45 -36
- data/ext/zstdruby/libzstd/common/fse.h +3 -2
- data/ext/zstdruby/libzstd/common/fse_decompress.c +19 -17
- data/ext/zstdruby/libzstd/common/huf.h +14 -1
- data/ext/zstdruby/libzstd/common/mem.h +0 -9
- data/ext/zstdruby/libzstd/common/pool.c +1 -1
- data/ext/zstdruby/libzstd/common/pool.h +1 -1
- data/ext/zstdruby/libzstd/common/portability_macros.h +2 -0
- data/ext/zstdruby/libzstd/common/threading.c +8 -2
- data/ext/zstdruby/libzstd/common/xxhash.c +5 -11
- data/ext/zstdruby/libzstd/common/xxhash.h +2341 -1007
- data/ext/zstdruby/libzstd/common/zstd_internal.h +5 -5
- data/ext/zstdruby/libzstd/compress/fse_compress.c +8 -7
- data/ext/zstdruby/libzstd/compress/huf_compress.c +54 -25
- data/ext/zstdruby/libzstd/compress/zstd_compress.c +282 -161
- data/ext/zstdruby/libzstd/compress/zstd_compress_internal.h +29 -27
- data/ext/zstdruby/libzstd/compress/zstd_compress_superblock.c +224 -113
- data/ext/zstdruby/libzstd/compress/zstd_cwksp.h +19 -13
- data/ext/zstdruby/libzstd/compress/zstd_double_fast.c +17 -5
- data/ext/zstdruby/libzstd/compress/zstd_double_fast.h +11 -0
- data/ext/zstdruby/libzstd/compress/zstd_fast.c +14 -6
- data/ext/zstdruby/libzstd/compress/zstd_lazy.c +129 -87
- data/ext/zstdruby/libzstd/compress/zstd_lazy.h +103 -28
- data/ext/zstdruby/libzstd/compress/zstd_ldm.c +8 -2
- data/ext/zstdruby/libzstd/compress/zstd_opt.c +216 -112
- data/ext/zstdruby/libzstd/compress/zstd_opt.h +31 -7
- data/ext/zstdruby/libzstd/compress/zstdmt_compress.c +94 -79
- data/ext/zstdruby/libzstd/decompress/huf_decompress.c +188 -126
- data/ext/zstdruby/libzstd/decompress/huf_decompress_amd64.S +38 -19
- data/ext/zstdruby/libzstd/decompress/zstd_decompress.c +84 -32
- data/ext/zstdruby/libzstd/decompress/zstd_decompress_block.c +231 -208
- data/ext/zstdruby/libzstd/decompress/zstd_decompress_block.h +1 -1
- data/ext/zstdruby/libzstd/decompress/zstd_decompress_internal.h +2 -0
- data/ext/zstdruby/libzstd/dictBuilder/cover.c +16 -12
- data/ext/zstdruby/libzstd/dictBuilder/cover.h +2 -8
- data/ext/zstdruby/libzstd/dictBuilder/fastcover.c +2 -2
- data/ext/zstdruby/libzstd/dictBuilder/zdict.c +12 -6
- data/ext/zstdruby/libzstd/zstd.h +129 -60
- data/ext/zstdruby/streaming_compress.c +23 -3
- data/ext/zstdruby/streaming_decompress.c +23 -3
- data/lib/zstd-ruby/version.rb +1 -1
- metadata +2 -2
@@ -11,7 +11,11 @@ static void
|
|
11
11
|
streaming_compress_mark(void *p)
|
12
12
|
{
|
13
13
|
struct streaming_compress_t *sc = p;
|
14
|
+
#ifdef HAVE_RB_GC_MARK_MOVABLE
|
15
|
+
rb_gc_mark_movable(sc->buf);
|
16
|
+
#else
|
14
17
|
rb_gc_mark(sc->buf);
|
18
|
+
#endif
|
15
19
|
}
|
16
20
|
|
17
21
|
static void
|
@@ -31,10 +35,26 @@ streaming_compress_memsize(const void *p)
|
|
31
35
|
return sizeof(struct streaming_compress_t);
|
32
36
|
}
|
33
37
|
|
38
|
+
#ifdef HAVE_RB_GC_MARK_MOVABLE
|
39
|
+
static size_t
|
40
|
+
streaming_compress_compact(void *p)
|
41
|
+
{
|
42
|
+
struct streaming_compress_t *sc = p;
|
43
|
+
sc->buf = rb_gc_location(sc->buf);
|
44
|
+
}
|
45
|
+
#endif
|
46
|
+
|
34
47
|
static const rb_data_type_t streaming_compress_type = {
|
35
|
-
|
36
|
-
|
37
|
-
|
48
|
+
"streaming_compress",
|
49
|
+
{
|
50
|
+
streaming_compress_mark,
|
51
|
+
streaming_compress_free,
|
52
|
+
streaming_compress_memsize,
|
53
|
+
#ifdef HAVE_RB_GC_MARK_MOVABLE
|
54
|
+
streaming_compress_compact,
|
55
|
+
#endif
|
56
|
+
},
|
57
|
+
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
|
38
58
|
};
|
39
59
|
|
40
60
|
static VALUE
|
@@ -10,7 +10,11 @@ static void
|
|
10
10
|
streaming_decompress_mark(void *p)
|
11
11
|
{
|
12
12
|
struct streaming_decompress_t *sd = p;
|
13
|
+
#ifdef HAVE_RB_GC_MARK_MOVABLE
|
14
|
+
rb_gc_mark_movable(sd->buf);
|
15
|
+
#else
|
13
16
|
rb_gc_mark(sd->buf);
|
17
|
+
#endif
|
14
18
|
}
|
15
19
|
|
16
20
|
static void
|
@@ -30,10 +34,26 @@ streaming_decompress_memsize(const void *p)
|
|
30
34
|
return sizeof(struct streaming_decompress_t);
|
31
35
|
}
|
32
36
|
|
37
|
+
#ifdef HAVE_RB_GC_MARK_MOVABLE
|
38
|
+
static size_t
|
39
|
+
streaming_decompress_compact(void *p)
|
40
|
+
{
|
41
|
+
struct streaming_decompress_t *sd = p;
|
42
|
+
sd->buf = rb_gc_location(sd->buf);
|
43
|
+
}
|
44
|
+
#endif
|
45
|
+
|
33
46
|
static const rb_data_type_t streaming_decompress_type = {
|
34
|
-
|
35
|
-
|
36
|
-
|
47
|
+
"streaming_decompress",
|
48
|
+
{
|
49
|
+
streaming_decompress_mark,
|
50
|
+
streaming_decompress_free,
|
51
|
+
streaming_decompress_memsize,
|
52
|
+
#ifdef HAVE_RB_GC_MARK_MOVABLE
|
53
|
+
streaming_decompress_compact,
|
54
|
+
#endif
|
55
|
+
},
|
56
|
+
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
|
37
57
|
};
|
38
58
|
|
39
59
|
static VALUE
|
data/lib/zstd-ruby/version.rb
CHANGED
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.
|
4
|
+
version: 1.5.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SpringMT
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|