yaz0 0.4.1 → 0.4.2

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: 42f0c89e2edf019afff5f5e96f7cbf1797036ab93ed0725cf58efcdf23607e8f
4
- data.tar.gz: 03440e46538b5197eea2d7d490ace2137d83879948ab23e066c779ceffad070b
3
+ metadata.gz: 857c2a0a5b230d48ad3e295e5877096d6287dd1c6bb1f072817a83e5a00b6851
4
+ data.tar.gz: 87bdadd4138b0f29d95061dc82073373c7cff344b00f0dd2b40cc581f2264c71
5
5
  SHA512:
6
- metadata.gz: 20d3ce38706053cce8975aa079e02b267418f80c4eca0f054b0a09d6116c9a74ce8badbfb4fd12f7c7e88ef074b16d00bef251275961ce38cec6510997e4c3f8
7
- data.tar.gz: f5ae97c8115585c113fc5cd139c393c253cb1efc217815e108afdd4f720db315b2e19dc688696f63f3385a0771583a5a2dfc64192ffb71eabfecfe7ecf026a13
6
+ metadata.gz: 40aab200a225dbc5131a96500dd08011f5054fc8916525caf6fcfa7fed7a3344d559de56f0a36875bc9785773d1be9c9301bd899821e58f447f4fbfc155f699a
7
+ data.tar.gz: 29aa243dd3c0111414cd33a600cacc0dbc47c3dc159199ab7539813949c5b4fb8dd7726c6bd95c92c8f377a8bf68bb7354e73dc0a3c873258ced29b7797e1aa9
data/lib/yaz0/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yaz0
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
data/lib/yaz0/yaz0.so CHANGED
Binary file
@@ -231,35 +231,6 @@ static void findHashMatch(Yaz0Stream* s, uint32_t h, uint32_t offset, uint32_t*
231
231
  }
232
232
  }
233
233
 
234
- static void findEarlyZeroes(Yaz0Stream* s, uint32_t* outSize, uint32_t* outPos)
235
- {
236
- uint32_t size;
237
- uint32_t bestSize;
238
- uint32_t bestPos;
239
-
240
- bestSize = 0;
241
- bestPos = 0;
242
- for (uint32_t pos = 0x1000; pos > 0x990; --pos)
243
- {
244
- size = matchSize(s, 0, pos, 0);
245
- if (size > bestSize)
246
- {
247
- bestSize = size;
248
- bestPos = pos;
249
- }
250
- }
251
-
252
- if (bestSize < 3)
253
- {
254
- *outSize = 0;
255
- }
256
- else
257
- {
258
- *outSize = bestSize;
259
- *outPos = bestPos;
260
- }
261
- }
262
-
263
234
  static void emitGroup(Yaz0Stream* s, int count, const uint32_t* arrSize, const uint32_t* arrPos)
264
235
  {
265
236
  uint8_t header;
@@ -324,19 +295,6 @@ static void compressGroup(Yaz0Stream* s)
324
295
  findHashMatch(s, h, 0, &size, &pos);
325
296
  hashWrite(s, h, 0);
326
297
 
327
- /* Check for early zero */
328
- if (s->window[s->window_start] == 0 && s->totalOut < 0x1000)
329
- {
330
- findEarlyZeroes(s, &nextSize, &nextPos);
331
- if (nextSize > size)
332
- {
333
- size = nextSize;
334
- pos = nextPos;
335
- }
336
- }
337
-
338
- nextSize = 0;
339
- nextPos = 0;
340
298
  h = hash(b, c, d);
341
299
  findHashMatch(s, h, 1, &nextSize, &nextPos);
342
300
 
@@ -75,10 +75,10 @@ static int ensureWindowFree(Yaz0Stream* stream)
75
75
  {
76
76
  static const uint32_t maxSize = 0x111 * 8;
77
77
 
78
- if (windowFreeSize(stream) < maxSize)
78
+ if (windowFreeSize(stream) <= maxSize)
79
79
  {
80
80
  flush(stream);
81
- if (windowFreeSize(stream) < maxSize)
81
+ if (windowFreeSize(stream) <= maxSize)
82
82
  return YAZ0_NEED_AVAIL_OUT;
83
83
  }
84
84
  return YAZ0_OK;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaz0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nax
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-10 00:00:00.000000000 Z
11
+ date: 2022-08-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: