isomorfeus-hamster 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e47bdc930e499583d4d07732990944617d8b1cf87b8694f846a060b0ec864b5
4
- data.tar.gz: 3e9561cc9748cda8b494d056853f9c5c4c6a621c48523554a20b4ce4b61935ab
3
+ metadata.gz: e186ba78fcf4810b5663570e71e59670c84cc5ac69cc7f763a6bf69fbf69ea6c
4
+ data.tar.gz: 4b782b907c2912b0dd0bf41465a3d892e8df58a70fe1a54efa9deb0cd9720e95
5
5
  SHA512:
6
- metadata.gz: 7cbcc1820f97759384a868fd3af9003a706d6cc3291d1b6e06cee417c00c7f0b7ac270ba887e2fc9802963ad94474809faa8f1a2ec03f408a988532a5f36ebe9
7
- data.tar.gz: 9789b1d1116bd0081cdc656491ef95a7f357e8ad4ad647081afd2ac5251bfd7328bbd3c26873abb4245554078132dc910f99907981c606b061d08576c901d22f
6
+ metadata.gz: d15d65f4fe1bb5a5676c5e87d6037ea331f4652d7b83fdc968a2e9e9567fa3f1d4cf3d98bc5ff51b4c61448e7655fede3b8c19b596d1ffdef35db4265f018aea
7
+ data.tar.gz: 59f4df54ec87985d09a988057112279ee573a5628540f2d30d25261913f1f046cbd0d63ef76a0488dc624425c7f77af24dc9828d83452102b005401d5d17ab8f
@@ -17,12 +17,15 @@ module Isomorfeus
17
17
  ::Oj.load(v, mode: :object, circular: true, class_cache: class_cache)
18
18
  end
19
19
 
20
- def serialize(obj, class_cache: true)
21
- ::Oj.dump(obj, mode: :object, circular: true, class_cache: class_cache)
20
+ def serialize(obj, class_cache: true, compress: false)
21
+ v = ::Oj.dump(obj, mode: :object, circular: true, class_cache: class_cache)
22
+ v = 'b:' << ::Brotli.deflate(v, quality: compress) if compress
23
+ v
22
24
  end
23
25
 
24
- def unserialize(obj_j, class_cache: true)
25
- ::Oj.load(obj_j, mode: :object, circular: true, class_cache: class_cache)
26
+ def unserialize(v, class_cache: true)
27
+ v = ::Brotli.inflate(v[2..]) if v.start_with?(BROTLI)
28
+ ::Oj.load(v, mode: :object, circular: true, class_cache: class_cache)
26
29
  end
27
30
  end
28
31
  end
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module Hamster
3
- VERSION = '0.6.5'
3
+ VERSION = '0.6.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-hamster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-18 00:00:00.000000000 Z
11
+ date: 2022-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: brotli