omq-curve 0.2.1 → 0.2.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: 3f8d316b464a86a440d95be8da6afc1ef2437ac48bac6f8f81b4d3f44ba44ef9
4
- data.tar.gz: 23964f37d40bc831f18e2633d6be272fc2ccb954e06ef01087cf06fabd3fc25c
3
+ metadata.gz: 320bd39874679cadea5a673ee44625ad9d6e20e0835728c51657b7dc12c979f4
4
+ data.tar.gz: 2e5428680c0512a4d890bb54954603208c005dba013df41329a277938c055bae
5
5
  SHA512:
6
- metadata.gz: 1372148c98f3dc3172802151f2cd2c29950c07e65e855bee51cf1e2bc31a476c4acc9849ec28249e448d6e36e8cfdbd0ba88d5c0749bab6817cc6f2519128e1d
7
- data.tar.gz: 7e484dcc30c1c16ce01c6ced6848affac0de3023b2feb89cf9c0aa340ffa490f061a20af16b0bab8f531e522ae29412bcb3fe5c5b741a2306d499a7189577689
6
+ metadata.gz: 35d767569e5cd76b7ad8029ceb0335db861e5ecf9ccf7f07102601969fd35969f6ac1f2e741c9d4862355a07b81ab50b2543c5c3214f67d54ab1d798363efad8
7
+ data.tar.gz: ed45da6fd7c222347a51ec3869c5bc4abf4e836572868314ea47fe4ed6dd65d4a1fb80615f4ddbea476933969cad4ca6f10a04459a0f089c4105184d96ef3dcd
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.2 — 2026-03-26
4
+
5
+ ### Improved
6
+
7
+ - Inline frame wire encoding in encrypt, bypassing `Frame.new.to_wire`
8
+ and its `IO::Buffer` allocation — especially helps larger messages
9
+ (4KB TCP: +87% vs v0.2.0)
10
+
3
11
  ## 0.2.1 — 2026-03-26
4
12
 
5
13
  ### Improved
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- OMQ_CURVE_VERSION = "0.2.1"
3
+ OMQ_CURVE_VERSION = "0.2.2"
@@ -134,7 +134,12 @@ module OMQ
134
134
  short_nonce = nonce.byteslice(16, 8)
135
135
 
136
136
  msg_body = "\x07MESSAGE".b + short_nonce + ciphertext
137
- Codec::Frame.new(msg_body).to_wire
137
+ size = msg_body.bytesize
138
+ if size > 255
139
+ "\x02".b + [size].pack("Q>") + msg_body
140
+ else
141
+ "\x00".b + size.chr.b + msg_body
142
+ end
138
143
  end
139
144
 
140
145
  # Decrypts a CurveZMQ MESSAGE command into a Frame.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omq-curve
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Wenger