yaz0 0.4.1 → 0.4.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 +4 -4
- data/lib/yaz0/version.rb +1 -1
- data/lib/yaz0/yaz0.so +0 -0
- data/libyaz0/src/libyaz0/compress.c +0 -42
- data/libyaz0/src/libyaz0/decompress.c +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 857c2a0a5b230d48ad3e295e5877096d6287dd1c6bb1f072817a83e5a00b6851
|
4
|
+
data.tar.gz: 87bdadd4138b0f29d95061dc82073373c7cff344b00f0dd2b40cc581f2264c71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40aab200a225dbc5131a96500dd08011f5054fc8916525caf6fcfa7fed7a3344d559de56f0a36875bc9785773d1be9c9301bd899821e58f447f4fbfc155f699a
|
7
|
+
data.tar.gz: 29aa243dd3c0111414cd33a600cacc0dbc47c3dc159199ab7539813949c5b4fb8dd7726c6bd95c92c8f377a8bf68bb7354e73dc0a3c873258ced29b7797e1aa9
|
data/lib/yaz0/version.rb
CHANGED
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)
|
78
|
+
if (windowFreeSize(stream) <= maxSize)
|
79
79
|
{
|
80
80
|
flush(stream);
|
81
|
-
if (windowFreeSize(stream)
|
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.
|
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-
|
11
|
+
date: 2022-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|