zopfli 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +1 -2
- data/ext/zopfli.c +2 -3
- data/lib/zopfli/version.rb +1 -1
- data/smoke.sh +1 -1
- data/vendor/zopfli/src/zopfli/deflate.c +1 -1
- data/vendor/zopfli/src/zopfli/zopfli_bin.c +1 -4
- data/zopfli.gemspec +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3121a61abacb0a102a03f4ec91ac9e6ee4a6132942d6e402bcfded04a25f39bd
|
4
|
+
data.tar.gz: 544aee94aaaa325abcaee491d8b052a59dbd6809794fb2cdd4dd3fd787c466dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ff282d1b59f9bd4ab899cb1a16b63cadc64bb5a24c72b76289b136eadd8b50fcd14cb3a787169bc342ca1c6bb4ca5f405cc412eb3c13af6f4aa0c389cae2ec9
|
7
|
+
data.tar.gz: 24c803340ae499cf43da0d62b4fd916a0a05db1db07967461a7e65145810b70129a8063d4b972a1dad67ec8a6691b0ecf4d057390a78be771efae17983cae142
|
data/.travis.yml
CHANGED
@@ -5,14 +5,13 @@ cache:
|
|
5
5
|
directories:
|
6
6
|
- "$HOME/.ccache"
|
7
7
|
rvm:
|
8
|
-
- 2.2.0
|
9
8
|
- 2.3.3
|
10
9
|
- 2.4.0
|
11
10
|
env:
|
12
11
|
global:
|
13
12
|
- PATH="/usr/lib/ccache:$PATH"
|
14
13
|
before_install:
|
15
|
-
- gem install bundler
|
14
|
+
- travis_retry gem install bundler --no-document
|
16
15
|
deploy:
|
17
16
|
provider: rubygems
|
18
17
|
api_key:
|
data/ext/zopfli.c
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
#include "ruby.h"
|
2
|
+
#include "ruby/thread.h"
|
2
3
|
#include "zopfli.h"
|
3
4
|
|
4
5
|
#define CSTR2SYM(x) ID2SYM(rb_intern(x))
|
5
6
|
#define DEFAULT_FORMAT ZOPFLI_FORMAT_ZLIB
|
6
7
|
|
7
|
-
static VALUE rb_mZopfli;
|
8
|
-
|
9
8
|
static ZopfliFormat
|
10
9
|
zopfli_deflate_parse_options(ZopfliOptions *options, VALUE opts)
|
11
10
|
{
|
@@ -107,6 +106,6 @@ zopfli_deflate(int argc, VALUE *argv, VALUE self)
|
|
107
106
|
void
|
108
107
|
Init_zopfli()
|
109
108
|
{
|
110
|
-
rb_mZopfli = rb_define_module("Zopfli");
|
109
|
+
VALUE rb_mZopfli = rb_define_module("Zopfli");
|
111
110
|
rb_define_singleton_method(rb_mZopfli, "deflate", zopfli_deflate, -1);
|
112
111
|
}
|
data/lib/zopfli/version.rb
CHANGED
data/smoke.sh
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
gem list | grep zopfli && gem uninstall --force zopfli
|
3
3
|
bundle exec rake clean build
|
4
|
-
gem install --force --local --no-
|
4
|
+
gem install --force --local --no-document "$(ls pkg/zopfli-*.gem)"
|
5
5
|
cat <<EOF | ruby
|
6
6
|
require 'zopfli'
|
7
7
|
require 'zlib'
|
@@ -449,7 +449,7 @@ void OptimizeHuffmanForRle(int length, size_t* counts) {
|
|
449
449
|
}
|
450
450
|
/* 2) Let's mark all population counts that already can be encoded
|
451
451
|
with an rle code.*/
|
452
|
-
good_for_rle = (int*)malloc(length * sizeof(int));
|
452
|
+
good_for_rle = (int*)malloc((unsigned)length * sizeof(int));
|
453
453
|
for (i = 0; i < length; ++i) good_for_rle[i] = 0;
|
454
454
|
|
455
455
|
/* Let's not spoil any of the existing good rle codes.
|
@@ -114,14 +114,11 @@ static void CompressFile(const ZopfliOptions* options,
|
|
114
114
|
if (outfilename) {
|
115
115
|
SaveFile(outfilename, out, outsize);
|
116
116
|
} else {
|
117
|
-
size_t i;
|
118
117
|
#if _WIN32
|
119
118
|
/* Windows workaround for stdout output. */
|
120
119
|
_setmode(_fileno(stdout), _O_BINARY);
|
121
120
|
#endif
|
122
|
-
|
123
|
-
printf("%c", out[i]);
|
124
|
-
}
|
121
|
+
fwrite(out, 1, outsize, stdout);
|
125
122
|
}
|
126
123
|
|
127
124
|
free(out);
|
data/zopfli.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
spec.extensions = ["ext/extconf.rb"]
|
26
26
|
|
27
|
-
spec.add_development_dependency "bundler", "~> 1.
|
27
|
+
spec.add_development_dependency "bundler", "~> 2.1.4"
|
28
28
|
spec.add_development_dependency "rake"
|
29
29
|
spec.add_development_dependency "rspec"
|
30
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zopfli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- miyucy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.1.4
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.1.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
|
-
|
125
|
-
rubygems_version: 2.4.5
|
124
|
+
rubygems_version: 3.0.8
|
126
125
|
signing_key:
|
127
126
|
specification_version: 4
|
128
127
|
summary: zopfli
|