omq-lz4 0.3.1 → 0.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b14469227b64cb647b42dbb8495754752ea81654449eab28cae78a0778aa36dd
4
- data.tar.gz: 344189a2d0c29ec2d46b310f5607d133bdba87a69fb974be6bb582101f76aacf
3
+ metadata.gz: 8b849f0045410a07f748583b8647d096110a7dbd632fcb9f3597e216c182cbdd
4
+ data.tar.gz: 94b0067640c5bef152f7381340b5e620ca1f2c66a42fc7b45de411c35f1ad2d1
5
5
  SHA512:
6
- metadata.gz: c3ef67d35613434faf125317a61dded584c8d268032eb01830e22a809415ab20b2cf198daa8ee7803d04e88b97d4b39bb6042071a7b18bbf8cff03cb6db06cee
7
- data.tar.gz: 49ed574d2b93d2e039160514602cf4f90e125edd9c2b3e05033fbbd5ee1dc1eb098373acaed27c54553e9e6977d6488d3f751b85544ad87a6f0498e5e061cad5
6
+ metadata.gz: d5c76cf382c5b074d914f0f35cf02b6aef495dea590a6929c8fc41827e67cd07b1a40bec263c2b4ccc71f90510b467d37b638c009a9665a21a0ac6dbc9e154d9
7
+ data.tar.gz: 8ec8d5da7f5396197af9dfe5ebf903b25ab7463dc51d7f6415c859f02941367080f0adeaf308f4dbb73739c786936fb923e3a04941e3edf3f85bee219df8a2fa
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## 0.3.2 - 2026-07-23
6
+
7
+ ### Changed
8
+
9
+ - Moved release source to the `zeromq/omq.rb` monorepo.
10
+ - Require `omq ~> 0.28` and Ruby >= 4.0.
11
+ - Require `lz4rip ~> 0.1.1`.
12
+
5
13
  ## 0.3.1 (2026-05-28)
6
14
 
7
15
  ### Changed
@@ -32,7 +40,7 @@
32
40
 
33
41
  ### Changed
34
42
 
35
- - use rlz4 ~> 0.5 (ported from lz4_flex to lz4_sys)
43
+ - use the Rust-backed LZ4 block codec with liblz4 bindings
36
44
 
37
45
  ## 0.1.0 (2026-04-23)
38
46
 
@@ -41,8 +49,8 @@
41
49
  - Gem skeleton: `omq-lz4.gemspec`, `lib/omq/lz4.rb`,
42
50
  `lib/omq/lz4/version.rb`, `lib/omq/lz4/errors.rb`, `Gemfile`,
43
51
  `Rakefile`, `.gitignore`, `LICENSE` (ISC), `README.md`, CI and
44
- release GitHub Actions workflows, minitest harness. Depends on
45
- `rlz4 ~> 0.3` (block API) and `omq ~> 0.23`.
52
+ release GitHub Actions workflows, minitest harness. Depends on a
53
+ Rust-backed LZ4 block API and `omq ~> 0.23`.
46
54
  - `require "omq/lz4"` succeeds and defines `OMQ::LZ4::VERSION` and
47
55
  `OMQ::LZ4::ProtocolError`. No transport behaviour yet — the
48
56
  `lz4+tcp://` scheme registration lands in a subsequent milestone.
@@ -138,7 +146,7 @@
138
146
  `MIN_COMPRESS_*` thresholds below.
139
147
  - `head_to_head.rb` — side-by-side microbenchmark (pure codec)
140
148
  and transport throughput of `omq-lz4` vs `omq-zstd`, with and
141
- without a shared dictionary. Requires `omq-zstd` + `rzstd` in
149
+ without a shared dictionary. Requires `omq-zstd` + `zrip` in
142
150
  the Gemfile's `:bench` group. Numbers land in README's
143
151
  "Head-to-head vs omq-zstd" section.
144
152
  - **Compression thresholds tuned** from the sweep:
data/README.md CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  [![Gem Version](https://img.shields.io/gem/v/omq-lz4?color=e9573f)](https://rubygems.org/gems/omq-lz4)
4
4
  [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](LICENSE)
5
- [![Ruby](https://img.shields.io/badge/Ruby-%3E%3D%203.3-CC342D?logo=ruby&logoColor=white)](https://www.ruby-lang.org)
5
+ [![Ruby](https://img.shields.io/badge/Ruby-%3E%3D%204.0-CC342D?logo=ruby&logoColor=white)](https://www.ruby-lang.org)
6
6
 
7
- LZ4-compressed TCP transport for [OMQ](https://github.com/paddor/omq),
8
- complementary to [`omq-zstd`](https://github.com/paddor/omq-zstd).
9
- Pick `lz4+tcp://` instead of `tcp://` or `zstd+tcp://` when you want
10
- cheap per-message compression with a small per-connection footprint.
7
+ LZ4-compressed TCP transport for [OMQ](https://github.com/zeromq/omq.rb).
8
+ Pick `lz4+tcp://` instead of `tcp://` when you want cheap per-message
9
+ compression with a small per-connection footprint. `omq-lz4` is the
10
+ preferred compressed TCP transport. `omq-zstd` is experimental.
11
11
 
12
12
  See [RFC.md](RFC.md) for the wire-format specification and
13
13
  [CHANGELOG.md](CHANGELOG.md) for release history.
14
14
 
15
- ## When to pick `lz4+tcp://` over `zstd+tcp://`
15
+ ## Why `lz4+tcp://`
16
16
 
17
17
  LZ4 has no entropy stage (no Huffman, no FSE), ~16 KiB of encoder state
18
18
  per connection, and trades a **worse compression ratio** for
@@ -25,12 +25,14 @@ per connection, and trades a **worse compression ratio** for
25
25
  | Memory per connection | ~256 KiB | ~16 KiB + dict |
26
26
  | Ratio, 1 KiB JSON no dict | ~45% | ~65% |
27
27
  | Ratio, 1 KiB JSON with dict | ~20% | ~35% |
28
- | Auto-trained dictionaries | yes | no (user-supplied only) |
28
+ | Auto-trained dictionaries | yes | yes |
29
29
 
30
30
  Pick `omq-lz4` for CPU- or memory-scarce deployments (edge gateways,
31
31
  IoT concentrators, high-fanout scenarios where per-connection state
32
- matters more than ratio). Pick `omq-zstd` for bandwidth-bound
33
- deployments where CPU is cheap.
32
+ matters more than ratio). It is also the default choice for bandwidth
33
+ bound deployments now that lz4rip supports dictionary training.
34
+ `omq-zstd` remains useful for experiments where the tighter zstd ratio
35
+ is worth extra transport complexity.
34
36
 
35
37
  ## Install
36
38
 
@@ -66,14 +68,19 @@ Both peers must use `lz4+tcp://`. A `tcp://` peer cannot talk to an
66
68
 
67
69
  Small messages don't compress well on their own. A shared dictionary
68
70
  gives 2-5x better ratios on payloads with a common prefix. Supply a
69
- user-trained dictionary (LZ4 has no auto-training; use `omq-zstd`
70
- for that):
71
+ user-trained dictionary:
71
72
 
72
73
  ```ruby
73
74
  dict = File.binread("schema.dict")
74
75
  push.connect("lz4+tcp://127.0.0.1:5555", dict: dict)
75
76
  ```
76
77
 
78
+ Or let lz4rip train one from early traffic:
79
+
80
+ ```ruby
81
+ push.connect("lz4+tcp://127.0.0.1:5555", auto_dict: true)
82
+ ```
83
+
77
84
  The sender ships the dictionary to the receiver in-band, prefixed
78
85
  with the dictionary sentinel (`4C 5A 34 44`, "LZ4D" in ASCII), on
79
86
  the first outgoing message. The receiver installs the dictionary
@@ -100,7 +107,7 @@ The receiver bounds decompression by the socket's `max_message_size`
100
107
  attempting to send an over-budget message drops the connection.
101
108
  `OMQ::SocketDeadError` surfaces on the next `receive`.
102
109
 
103
- Independent of that, the dictionary itself is capped at 8 KiB; a
110
+ Independent of that, the dictionary itself is capped at 8 KiB. A
104
111
  larger shipment drops the connection.
105
112
 
106
113
  ## Wire format
@@ -117,7 +124,7 @@ Every post-handshake ZMTP message part starts with a 4-byte sentinel:
117
124
  **Single-block** (`LZ4B`): `sentinel (4) || decompressed_size u64 LE (8) || LZ4 block bytes`.
118
125
  12-byte envelope. Raw LZ4 block format (no magic, no descriptor, no
119
126
  checksum). `decompressed_size` is required because LZ4 block format
120
- carries no length prefix; the receiver pre-sizes its output buffer.
127
+ carries no length prefix. The receiver pre-sizes its output buffer.
121
128
 
122
129
  **Multi-block** (`LZ4M`): same header, followed by a sequence of
123
130
  `u32 LE compressed_block_len || LZ4 block bytes` pairs. Each block
@@ -214,10 +221,10 @@ Three regimes visible:
214
221
  tighter the ratio, the bigger the win: `zstd 3`'s 3% wire ratio
215
222
  translates to a **~17x throughput multiplier** over plain tcp.
216
223
  - **1 Gbit**: compressed transports shift from wire-saturated to
217
- CPU-limited. `zstd -3` reaches ~75% of wire cap; `zstd 3` only
224
+ CPU-limited. `zstd -3` reaches ~75% of wire cap. `zstd 3` only
218
225
  29% (deep CPU-bound). Both beat plain tcp (which is pinned at
219
226
  the wire cap) by **6-8x**. `zstd 3`'s tighter wire no longer
220
- helps; there's no wire saturation to trade CPU for.
227
+ helps. There is no wire saturation to trade CPU for.
221
228
  - **Unlimited loopback**: no wire cap. All three are
222
229
  CPU-limited. Plain tcp doesn't pay compression CPU, so **skip
223
230
  compression on loopback**.
@@ -234,7 +241,7 @@ Or use a `veth` pair in a network namespace so shaping doesn't
234
241
  touch your host's real loopback (see `tc-netem(8)`, `ip-netns(8)`).
235
242
 
236
243
  Full sweeps (8 sizes from 256 B to 512 KiB) for each regime live
237
- in `bench/head_to_head.rb` output. Run it yourself; the
244
+ in `bench/head_to_head.rb` output. Run it yourself. The
238
245
  headline numbers above are stable across repeats but small sizes
239
246
  and very large sizes vary a bit run-to-run.
240
247
 
@@ -243,12 +250,13 @@ and very large sizes vary a bit run-to-run.
243
250
  - Pick **`lz4+tcp://`** for bandwidth-limited links (any real
244
251
  network, even 1 Gbit LAN). 6-9x throughput multiplier over
245
252
  plain `tcp`, minimal memory (~16 KiB/connection), modest CPU.
246
- Ties or beats `zstd -3` at 1 Gbit; loses the ratio race to
253
+ Ties or beats `zstd -3` at 1 Gbit. Loses the ratio race to
247
254
  `zstd 3` at 100 Mbit and below.
248
255
  - Pick **`zstd+tcp://` (level >= 3)** when the wire is the
249
256
  precious resource (100 Mbit links or slower, WAN, or you're
250
257
  paying for egress). **~17x throughput multiplier at 100 Mbit**
251
- for 128 KiB messages is hard to argue with.
258
+ for 128 KiB messages is hard to argue with. Treat this as
259
+ experimental in Ruby OMQ.
252
260
  - Pick **plain `tcp://`** when the link is *not* the bottleneck
253
261
  (localhost IPC, loopback, datacenter-fast inter-host
254
262
  connections where the bandwidth ceiling is above the CPU's
data/lib/omq/lz4/codec.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "rlz4"
3
+ require "lz4rip"
4
4
 
5
5
  require_relative "errors"
6
6
 
@@ -62,7 +62,7 @@ module OMQ
62
62
  # back to passthrough when compression wouldn't save at least the
63
63
  # envelope overhead.
64
64
  #
65
- # `block_codec` is an RLZ4::BlockCodec, optionally constructed with
65
+ # `block_codec` is an Lz4rip::BlockCodec, optionally constructed with
66
66
  # `dict: bytes`. The codec's dict presence is detected via
67
67
  # `#has_dict?` to pick the min-size threshold.
68
68
  #
@@ -120,7 +120,7 @@ module OMQ
120
120
  block = wire_bytes.byteslice(12, wire_bytes.bytesize - 12)
121
121
  begin
122
122
  block_codec.decompress(block, decompressed_size: decompressed_size)
123
- rescue RLZ4::DecompressError => e
123
+ rescue Lz4rip::DecompressError => e
124
124
  raise ProtocolError, "LZ4B decode failed: #{e.message}"
125
125
  end
126
126
  when LZ4M_SENTINEL
@@ -213,7 +213,7 @@ module OMQ
213
213
  block_decompressed_size = [block_size, remaining].min
214
214
  begin
215
215
  output << block_codec.decompress(block_data, decompressed_size: block_decompressed_size)
216
- rescue RLZ4::DecompressError => e
216
+ rescue Lz4rip::DecompressError => e
217
217
  raise ProtocolError, "LZ4M block decode failed: #{e.message}"
218
218
  end
219
219
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OMQ
4
4
  module LZ4
5
- VERSION = "0.3.1"
5
+ VERSION = "0.3.2"
6
6
  end
7
7
  end
@@ -12,30 +12,44 @@ module OMQ
12
12
  # receive_message route through compression, but everything else
13
13
  # (write_command, close, etc.) passes through untouched.
14
14
  class Lz4Connection < SimpleDelegator
15
+ DEFAULT_DICT_CAPACITY = 2048
16
+ DEFAULT_TRAIN_TRIGGER = 100
17
+
15
18
  # @return [Integer, nil] wire bytesize of the last received
16
19
  # message (sum across parts, compressed sentinel included).
17
20
  attr_reader :last_wire_size_in
18
21
 
19
- def initialize(conn, send_dict_bytes:, max_message_size:)
22
+ def initialize(conn, send_dict_bytes:, max_message_size:, auto_dict: nil)
20
23
  super(conn)
21
- @max_message_size = max_message_size
22
-
23
- # Per-direction state. The send codec is built at construction
24
- # with the send-side dictionary (if any) baked in. The receive
25
- # codec starts dict-less; if/when a dict shipment arrives on
26
- # this direction, it is replaced with a dict-bound codec.
27
- @send_dict_bytes = send_dict_bytes&.b
28
- @send_codec = build_block_codec(@send_dict_bytes)
29
- @send_dict_shipped = @send_dict_bytes.nil? # nothing to ship => "already shipped"
30
-
31
- @recv_codec = build_block_codec(nil)
32
- @recv_dict_bytes = nil
24
+ @max_message_size = max_message_size
33
25
 
26
+ @recv_codec = build_block_codec(nil)
27
+ @recv_dict_bytes = nil
34
28
  @last_wire_size_in = nil
29
+
30
+ if send_dict_bytes
31
+ @send_dict_bytes = send_dict_bytes.b
32
+ @send_codec = build_block_codec(@send_dict_bytes)
33
+ @send_dict_shipped = false
34
+ @trainer = nil
35
+ elsif auto_dict
36
+ @send_dict_bytes = nil
37
+ @send_codec = build_block_codec(nil)
38
+ @send_dict_shipped = true
39
+ @trainer = Lz4rip::DictTrainer.new(auto_dict[:capacity])
40
+ @train_trigger = auto_dict[:trigger]
41
+ @train_msg_count = 0
42
+ else
43
+ @send_dict_bytes = nil
44
+ @send_codec = build_block_codec(nil)
45
+ @send_dict_shipped = true
46
+ @trainer = nil
47
+ end
35
48
  end
36
49
 
37
50
 
38
51
  def send_message(parts)
52
+ maybe_train!(parts)
39
53
  wire = encode_parts(parts)
40
54
  ship_send_dict!
41
55
  __getobj__.send_message(wire)
@@ -43,6 +57,7 @@ module OMQ
43
57
 
44
58
 
45
59
  def write_message(parts)
60
+ maybe_train!(parts)
46
61
  wire = encode_parts(parts)
47
62
  ship_send_dict!
48
63
  __getobj__.write_message(wire)
@@ -50,6 +65,7 @@ module OMQ
50
65
 
51
66
 
52
67
  def write_messages(messages)
68
+ messages.each { |parts| maybe_train!(parts) }
53
69
  wires = messages.map { |parts| encode_parts(parts) }
54
70
  ship_send_dict!
55
71
  __getobj__.write_messages(wires)
@@ -76,10 +92,36 @@ module OMQ
76
92
 
77
93
  def build_block_codec(dict_bytes)
78
94
  if dict_bytes
79
- RLZ4::BlockCodec.new(dict: dict_bytes)
95
+ Lz4rip::BlockCodec.new(dict: dict_bytes)
80
96
  else
81
- RLZ4::BlockCodec.new
97
+ Lz4rip::BlockCodec.new
98
+ end
99
+ end
100
+
101
+
102
+ def maybe_train!(parts)
103
+ return unless @trainer
104
+
105
+ parts.each do |pt|
106
+ bytes = pt.is_a?(String) && pt.encoding == Encoding::BINARY ? pt : pt.to_s.b
107
+ @trainer.add_sample(bytes)
82
108
  end
109
+ @train_msg_count += 1
110
+ return if @train_msg_count < @train_trigger
111
+
112
+ finish_training!
113
+ end
114
+
115
+
116
+ def finish_training!
117
+ dict_bytes = @trainer.train
118
+ @trainer = nil
119
+
120
+ return if dict_bytes.empty?
121
+
122
+ @send_dict_bytes = dict_bytes.b.freeze
123
+ @send_codec = build_block_codec(@send_dict_bytes)
124
+ @send_dict_shipped = false
83
125
  end
84
126
 
85
127
 
@@ -137,9 +179,9 @@ module OMQ
137
179
 
138
180
  dict_bytes = LZ4::Codec.decode_dict_shipment(wire)
139
181
  # Replace the no-dict recv codec with a dict-bound one. The
140
- # old codec is GC'd. Per rlz4: "fresh codec when dict is
141
- # needed" BlockCodec's dict is a permanent property.
142
- @recv_codec = RLZ4::BlockCodec.new(dict: dict_bytes)
182
+ # old codec is GC'd. Lz4rip treats dict as a permanent codec
183
+ # property, so install-time is always a fresh build.
184
+ @recv_codec = Lz4rip::BlockCodec.new(dict: dict_bytes)
143
185
  @recv_dict_bytes = dict_bytes
144
186
  end
145
187
 
@@ -29,9 +29,15 @@ module OMQ
29
29
  # ship on the first outgoing message. If nil, no dict is
30
30
  # shipped (payloads compress without dict or go plaintext
31
31
  # below the min-size threshold).
32
+ # @param auto_dict [true, Hash, nil] enable automatic dictionary
33
+ # training from early traffic (RFC §7.6). Pass `true` for
34
+ # defaults (capacity=2048, trigger=100) or a Hash with
35
+ # `:capacity` and/or `:trigger` keys. Mutually exclusive
36
+ # with `dict:`.
32
37
  # @return [Listener]
33
- def listener(endpoint, engine, dict: nil, **)
38
+ def listener(endpoint, engine, dict: nil, auto_dict: nil, **)
34
39
  validate_dict!(dict)
40
+ validate_auto_dict!(auto_dict, dict)
35
41
 
36
42
  host, port = parse_endpoint(endpoint)
37
43
  lookup_host = normalize_bind_host(host)
@@ -46,7 +52,7 @@ module OMQ
46
52
  host_part = display_host.include?(":") ? "[#{display_host}]" : display_host
47
53
  resolved = "#{SCHEME}://#{host_part}:#{actual_port}"
48
54
 
49
- Listener.new(resolved, servers, actual_port, engine, dict&.b)
55
+ Listener.new(resolved, servers, actual_port, engine, dict&.b, normalize_auto_dict(auto_dict))
50
56
  end
51
57
 
52
58
 
@@ -55,10 +61,13 @@ module OMQ
55
61
  # @param endpoint [String]
56
62
  # @param engine [OMQ::Engine]
57
63
  # @param dict [String, nil] user-supplied dictionary bytes.
64
+ # @param auto_dict [true, Hash, nil] enable automatic dictionary
65
+ # training. See `listener` for details.
58
66
  # @return [Dialer]
59
- def dialer(endpoint, engine, dict: nil, **)
67
+ def dialer(endpoint, engine, dict: nil, auto_dict: nil, **)
60
68
  validate_dict!(dict)
61
- Dialer.new(endpoint, engine, dict&.b)
69
+ validate_auto_dict!(auto_dict, dict)
70
+ Dialer.new(endpoint, engine, dict&.b, normalize_auto_dict(auto_dict))
62
71
  end
63
72
 
64
73
 
@@ -111,6 +120,40 @@ module OMQ
111
120
  raise LZ4::ProtocolError,
112
121
  "dict size #{size} out of range [1, #{LZ4::Codec::MAX_DICT_SIZE}]"
113
122
  end
123
+
124
+
125
+ def validate_auto_dict!(auto_dict, dict)
126
+ return unless auto_dict
127
+
128
+ if dict
129
+ raise ArgumentError, "cannot combine auto_dict: and dict:"
130
+ end
131
+
132
+ return if auto_dict == true
133
+
134
+ unless auto_dict.is_a?(Hash)
135
+ raise TypeError, "auto_dict: must be true or a Hash; got #{auto_dict.class}"
136
+ end
137
+
138
+ cap = auto_dict[:capacity]
139
+ if cap && (cap < 1 || cap > LZ4::Codec::MAX_DICT_SIZE)
140
+ raise ArgumentError,
141
+ "auto_dict capacity #{cap} out of range [1, #{LZ4::Codec::MAX_DICT_SIZE}]"
142
+ end
143
+ end
144
+
145
+
146
+ def normalize_auto_dict(auto_dict)
147
+ return unless auto_dict
148
+
149
+ capacity = Lz4Connection::DEFAULT_DICT_CAPACITY
150
+ trigger = Lz4Connection::DEFAULT_TRAIN_TRIGGER
151
+ if auto_dict.is_a?(Hash)
152
+ capacity = auto_dict[:capacity] if auto_dict[:capacity]
153
+ trigger = auto_dict[:trigger] if auto_dict[:trigger]
154
+ end
155
+ { capacity: capacity, trigger: trigger }.freeze
156
+ end
114
157
  end
115
158
 
116
159
 
@@ -118,10 +161,11 @@ module OMQ
118
161
  class Dialer
119
162
  attr_reader :endpoint
120
163
 
121
- def initialize(endpoint, engine, dict_bytes)
122
- @endpoint = endpoint
123
- @engine = engine
164
+ def initialize(endpoint, engine, dict_bytes, auto_dict)
165
+ @endpoint = endpoint
166
+ @engine = engine
124
167
  @dict_bytes = dict_bytes
168
+ @auto_dict = auto_dict
125
169
  end
126
170
 
127
171
 
@@ -144,6 +188,7 @@ module OMQ
144
188
  conn,
145
189
  send_dict_bytes: @dict_bytes,
146
190
  max_message_size: @engine.options.max_message_size,
191
+ auto_dict: @auto_dict,
147
192
  )
148
193
  end
149
194
  end
@@ -153,13 +198,14 @@ module OMQ
153
198
  class Listener
154
199
  attr_reader :endpoint, :port
155
200
 
156
- def initialize(endpoint, servers, port, engine, dict_bytes)
157
- @endpoint = endpoint
158
- @servers = servers
159
- @port = port
160
- @engine = engine
201
+ def initialize(endpoint, servers, port, engine, dict_bytes, auto_dict)
202
+ @endpoint = endpoint
203
+ @servers = servers
204
+ @port = port
205
+ @engine = engine
161
206
  @dict_bytes = dict_bytes
162
- @tasks = []
207
+ @auto_dict = auto_dict
208
+ @tasks = []
163
209
  end
164
210
 
165
211
 
@@ -168,6 +214,7 @@ module OMQ
168
214
  conn,
169
215
  send_dict_bytes: @dict_bytes,
170
216
  max_message_size: @engine.options.max_message_size,
217
+ auto_dict: @auto_dict,
171
218
  )
172
219
  end
173
220
 
@@ -11,7 +11,7 @@
11
11
  # push.connect("lz4+tcp://127.0.0.1:5555")
12
12
 
13
13
  require "omq"
14
- require "rlz4"
14
+ require "lz4rip"
15
15
 
16
16
  require_relative "../lz4/errors"
17
17
  require_relative "../lz4/codec"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omq-lz4
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Wenger
@@ -15,31 +15,31 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '0.23'
18
+ version: '0.28'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '0.23'
25
+ version: '0.28'
26
26
  - !ruby/object:Gem::Dependency
27
- name: rlz4
27
+ name: lz4rip
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '0.5'
32
+ version: 0.1.1
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.5'
40
- description: 'Adds lz4+tcp:// endpoint support to OMQ with per-part LZ4 block-format
41
- compression, bounded decompression, and in-band dictionary shipping. Complementary
42
- to omq-zstd: worse ratio, far faster encode, far smaller per-connection footprint.'
39
+ version: 0.1.1
40
+ description: Adds lz4+tcp:// endpoint support to OMQ with per-part LZ4 block-format
41
+ compression, bounded decompression, in-band dictionary shipping, and automatic dictionary
42
+ training.
43
43
  email:
44
44
  - paddor@gmail.com
45
45
  executables: []
@@ -56,7 +56,7 @@ files:
56
56
  - lib/omq/transport/lz4_tcp.rb
57
57
  - lib/omq/transport/lz4_tcp/connection.rb
58
58
  - lib/omq/transport/lz4_tcp/transport.rb
59
- homepage: https://github.com/paddor/omq-lz4
59
+ homepage: https://github.com/zeromq/omq.rb/tree/main/gems/omq-lz4
60
60
  licenses:
61
61
  - ISC
62
62
  metadata: {}
@@ -67,14 +67,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
- version: '3.3'
70
+ version: '4.0'
71
71
  required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  requirements: []
77
- rubygems_version: 4.0.10
77
+ rubygems_version: 4.0.16
78
78
  specification_version: 4
79
79
  summary: LZ4+TCP transport for OMQ
80
80
  test_files: []