omq-cli 0.19.0 → 0.20.0

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: 92ca3f7bf414254b6ab93d4ff6282e1ca714292f6d7119c85cdb8d5f8e2e85c5
4
- data.tar.gz: '021193bf3cf3785355f9592087ca1b182b50e4fb43fb8cf4a5590b9b75390da5'
3
+ metadata.gz: ede67317b3727323e0de601f26a6cb93112a645d0c78f63b77902efad8847bb7
4
+ data.tar.gz: 00aa53d8b0de26cb145562c32854eb6e428533f0a59bf86c1984b579070be743
5
5
  SHA512:
6
- metadata.gz: 34500b01e5928851464136a9aeb9a5e2d6c76df95ae14f221068fcc399546b48abe662f0fdd68a9b1a73bde52b2fb20b3085dd9d1a14a08426f7baa40c0f224f
7
- data.tar.gz: '0319a006c9bfe02acc713676f6db87dfb93314b059af1cc0c25a8a7efb2abfa70ecaf9b5817047332861a8a71f77a5711608fe6fab7d111b7349b02704029e5f'
6
+ metadata.gz: cb3f2520d519501aa5a92f74a0429295e3e6f7340787ccd796ceddcdc78c7264fb4ca5b55954ae3b9e70095deea463cb06aa32a782bd7cef049961dde936b253
7
+ data.tar.gz: db1669fa2a29536f827557572f6bc07d238a6bef118bfd62b3eec138f80aee3664f192c2a92e8fc2139941a508c2f3d2213c758f06e4ef419a459452cf2411c5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 0.20.0 - 2026-11-26
6
+
7
+ - `-z` and `--compress=zstd` compress at an adaptive level: each connection
8
+ steps within -7..4 toward speed when compression is the limit and toward
9
+ ratio when the link is. They used a fixed level -3. `pub` and `radio`
10
+ keep -1, and `-Z` and `--compress=zstd:LEVEL` a fixed level.
11
+ - Require `omq-zstd ~> 0.6` and `omq-lz4 ~> 0.5`.
12
+
13
+ ## 0.19.1 - 2026-08-08
14
+
15
+ - Added `OMQ_BACKEND` support for choosing `ruby`, `rust`, or `libzmq`
16
+ as the default socket backend.
17
+ - Made `omq -v` print the effective socket backend at startup.
18
+
3
19
  ## 0.19.0 — 2026-08-03
4
20
 
5
21
  - **Rust backend selection via `--backend rust`.** Loads
data/README.md CHANGED
@@ -435,9 +435,9 @@ Both peers must pass `-z` (or otherwise opt into `zstd+tcp://`).
435
435
 
436
436
  | Flag | Effect |
437
437
  |------|--------|
438
- | `-z` | Compression at level **-3** (Zstd's fast strategy) |
439
- | `-Z` | Compression at level **3** (better ratio, more CPU) |
440
- | `--compress=LEVEL` | Custom level, e.g. `9`, `19`, `-1` |
438
+ | `-z` | Compression at an adaptive level: each connection steps within -7..4 toward speed when compression is the limit and toward ratio when the link is. `pub` and `radio` keep -1 |
439
+ | `-Z` | Compression at fixed level **3** (better ratio, more CPU) |
440
+ | `--compress=zstd:LEVEL` | Fixed level, e.g. `zstd:-1`, `zstd:4` |
441
441
 
442
442
  The sender auto-trains a dictionary from the first up-to-1000
443
443
  outgoing messages (or 100 KiB, whichever hits first), ships it inline
@@ -439,10 +439,10 @@ module OMQ
439
439
  opts[:compress_level] = level
440
440
  end
441
441
  end
442
- o.on("-z", "Zstd compression (level -3, fast)") { set_compress.call(:zstd, -3) }
443
- o.on("-Z", "Zstd compression (level 3, better ratio)") { set_compress.call(:zstd, 3) }
444
- o.on("--lz4", "LZ4 compression (FAST)") { set_compress.call(:lz4, nil) }
445
- o.on("--compress=SPEC", "Explicit codec[:level], e.g. zstd, zstd:3, zstd:-1, lz4") do |v|
442
+ o.on("-z", "Zstd compression, level adapts to CPU and link (-7..4)") { set_compress.call(:zstd, nil) }
443
+ o.on("-Z", "Zstd compression, fixed level 3 (better ratio)") { set_compress.call(:zstd, 3) }
444
+ o.on("--lz4", "LZ4 compression (FAST)") { set_compress.call(:lz4, nil) }
445
+ o.on("--compress=SPEC", "Explicit codec[:level], e.g. zstd (adaptive), zstd:3, zstd:-1, lz4") do |v|
446
446
  codec, level = parse_compress_spec(v)
447
447
  set_compress.call(codec, level)
448
448
  end
@@ -22,10 +22,6 @@ module OMQ
22
22
  # it entirely with --recv-maxsz 0.
23
23
  DEFAULT_RECV_MAXSZ = 1 << 20
24
24
 
25
- # Default zstd level when the user picks zstd without specifying one
26
- # (e.g. `--compress=zstd`). Matches the `-z` shortcut.
27
- DEFAULT_ZSTD_LEVEL = -3
28
-
29
25
  # Resolves compression state for a given pipe +side+ (:in, :out, or nil).
30
26
  # Per-side settings (in_compress / out_compress) override the global
31
27
  # +config.compress+. Returns +[codec, level]+ where codec is one of
@@ -63,14 +59,12 @@ module OMQ
63
59
 
64
60
 
65
61
  # Returns bind/connect kwargs for the chosen codec on the given
66
- # +side+. Zstd accepts a +level:+; LZ4 takes no tuning knobs.
62
+ # +side+. Zstd takes a fixed +level:+; without one, each connection
63
+ # adapts its level. LZ4 takes no tuning knobs.
67
64
  #
68
65
  def self.compress_opts(config, side: nil)
69
66
  codec, level = resolve_compress(config, side)
70
- case codec
71
- when :zstd then { level: level || DEFAULT_ZSTD_LEVEL }
72
- else {}
73
- end
67
+ codec == :zstd && level ? { level: level } : {}
74
68
  end
75
69
 
76
70
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OMQ
4
4
  module CLI
5
- VERSION = "0.19.0"
5
+ VERSION = "0.20.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omq-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Wenger
@@ -43,28 +43,28 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.4'
46
+ version: '0.6'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0.4'
53
+ version: '0.6'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: omq-lz4
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '0.3'
60
+ version: '0.5'
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '0.3'
67
+ version: '0.5'
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: msgpack
70
70
  requirement: !ruby/object:Gem::Requirement
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
152
  requirements: []
153
- rubygems_version: 4.0.16
153
+ rubygems_version: 4.0.20
154
154
  specification_version: 4
155
155
  summary: ZeroMQ CLI — pipe, filter, and transform messages from the terminal
156
156
  test_files: []