ruby-lzws 1.1.5 → 1.1.6
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/README.md +21 -54
- data/ext/extconf.rb +7 -0
- data/lib/lzws/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e18e16b625bf41931b87a5f3c46346bc13fa4cf7a3f616661e0d62ea5bdc58bf
|
4
|
+
data.tar.gz: e5708e1e0f82c370285d62062ec0581eff2673de586d608cbda14bb91e4c6c3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d19f703370a41e61e0b0fe5092377c18817a44f0c0ba3f3a2124a4fb171ce646366db4d200ffb2ac85111bde7c7f8239096c7073120a649045fb942f8f6e34e7
|
7
|
+
data.tar.gz: 80b07074716893223ce74610cf3a2f4a86cacc20880cfc4ca8df03b80a5aaa4b881addc21c7cebd59eb7ddf3457c37a604e98a09c35d88d3c3c1d93d377d37f7
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Ruby bindings for lzws library
|
2
2
|
|
3
|
-
| Travis | AppVeyor |
|
4
|
-
| :---: | :---: | :---: | :---:
|
5
|
-
| [](https://travis-ci.com/andrew-aladev/ruby-lzws) | [](https://ci.appveyor.com/project/andrew-aladev/ruby-lzws/branch/master) | [](https://travis-ci.com/andrew-aladev/ruby-lzws) | [](https://ci.appveyor.com/project/andrew-aladev/ruby-lzws/branch/master) | [](https://circleci.com/gh/andrew-aladev/ruby-lzws/tree/master) | [](https://codecov.io/gh/andrew-aladev/ruby-lzws) |
|
6
6
|
|
7
7
|
See [lzws library](https://github.com/andrew-aladev/lzws).
|
8
8
|
|
@@ -21,6 +21,8 @@ rake gem
|
|
21
21
|
gem install pkg/ruby-lzws-*.gem
|
22
22
|
```
|
23
23
|
|
24
|
+
You can also use [overlay](https://github.com/andrew-aladev/overlay) for gentoo.
|
25
|
+
|
24
26
|
## Usage
|
25
27
|
|
26
28
|
There are simple APIs: `String` and `File`. Also you can use generic streaming API: `Stream::Writer` and `Stream::Reader`.
|
@@ -84,59 +86,26 @@ end
|
|
84
86
|
|
85
87
|
## Options
|
86
88
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
89
|
+
| Option | Values | Default | Description |
|
90
|
+
|-----------------------------|--------------|------------|-------------|
|
91
|
+
| `source_buffer_length` | `0, 2 - inf` | `0 (auto)` | internal buffer length for source data |
|
92
|
+
| `destination_buffer_length` | `0, 2 - inf` | `0 (auto)` | internal buffer length for description data |
|
93
|
+
| `max_code_bit_length` | `9 - 16` | `16` | max code bit length |
|
94
|
+
| `block_mode` | `true/false` | `true` | enables block mode |
|
95
|
+
| `without_magic_header` | `true/false` | `false` | disables magic header |
|
96
|
+
| `msb` | `true/false` | `false` | enables most significant bit mode |
|
97
|
+
| `unaligned_bit_groups` | `true/false` | `false` | enables unaligned bit groups |
|
98
|
+
| `quiet` | `true/false` | `false` | disables lzws library logging |
|
93
99
|
|
94
100
|
There are internal buffers for compressed and decompressed data.
|
95
|
-
For example you want to use 1 KB as
|
96
|
-
You want to use 256 B as
|
97
|
-
|
98
|
-
Values: 0, 2 - infinity, default value: 0.
|
99
|
-
0 means automatic buffer length selection.
|
100
|
-
1 byte is not enough, 2 bytes is minimal buffer length.
|
101
|
+
For example you want to use 1 KB as `source_buffer_length` for compressor - please use 256 B as `destination_buffer_length`.
|
102
|
+
You want to use 256 B as `source_buffer_length` for decompressor - please use 1 KB as `destination_buffer_length`.
|
101
103
|
|
102
|
-
|
103
|
-
:max_code_bit_length
|
104
|
-
```
|
104
|
+
You can also read lzws docs for more info about options.
|
105
105
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
:block_mode
|
110
|
-
```
|
111
|
-
|
112
|
-
Values: true/false, default value: true.
|
113
|
-
|
114
|
-
```
|
115
|
-
:without_magic_header
|
116
|
-
```
|
117
|
-
|
118
|
-
Values: true/false, default value: false.
|
119
|
-
|
120
|
-
```
|
121
|
-
:msb
|
122
|
-
```
|
123
|
-
|
124
|
-
Values: true/false, default value: false.
|
125
|
-
|
126
|
-
```
|
127
|
-
:unaligned_bit_groups
|
128
|
-
```
|
129
|
-
|
130
|
-
Values: true/false, default value: false.
|
131
|
-
|
132
|
-
```
|
133
|
-
:quiet
|
134
|
-
```
|
135
|
-
|
136
|
-
Values: true/false, default value: false.
|
137
|
-
Disables lzws library logging.
|
138
|
-
|
139
|
-
Please read lzws docs for more info about options.
|
106
|
+
| Option | Related constants |
|
107
|
+
|-----------------------|-------------------|
|
108
|
+
| `max_code_bit_length` | `LZWS::Option::LOWEST_MAX_CODE_BIT_LENGTH = 9`, `LZWS::Option::BIGGEST_MAX_CODE_BIT_LENGTH = 16` |
|
140
109
|
|
141
110
|
Possible compressor options:
|
142
111
|
```
|
@@ -360,8 +329,6 @@ See universal test script [scripts/ci_test.sh](scripts/ci_test.sh) for CI.
|
|
360
329
|
Please visit [scripts/test-images](scripts/test-images).
|
361
330
|
You can run this test script using many native and cross images.
|
362
331
|
|
363
|
-
Cirrus CI uses `x86_64-pc-linux-gnu` image, Circle CI - `x86_64-gentoo-linux-musl` image.
|
364
|
-
|
365
332
|
## License
|
366
333
|
|
367
334
|
MIT license, see LICENSE and AUTHORS.
|
data/ext/extconf.rb
CHANGED
@@ -66,6 +66,13 @@ $srcs = %w[
|
|
66
66
|
.map { |name| "src/#{extension_name}/#{name}.c" }
|
67
67
|
.freeze
|
68
68
|
|
69
|
+
# Removing library duplicates.
|
70
|
+
$libs = $libs.split(%r{\s})
|
71
|
+
.reject(&:empty?)
|
72
|
+
.sort
|
73
|
+
.uniq
|
74
|
+
.join " "
|
75
|
+
|
69
76
|
if ENV["CI"] || ENV["COVERAGE"]
|
70
77
|
$CFLAGS << " --coverage"
|
71
78
|
$LDFLAGS << " --coverage"
|
data/lib/lzws/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-lzws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Aladjev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: codecov
|
@@ -191,9 +191,9 @@ require_paths:
|
|
191
191
|
- lib
|
192
192
|
required_ruby_version: !ruby/object:Gem::Requirement
|
193
193
|
requirements:
|
194
|
-
- - "
|
194
|
+
- - "~>"
|
195
195
|
- !ruby/object:Gem::Version
|
196
|
-
version: '
|
196
|
+
version: '2.7'
|
197
197
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
199
|
- - ">="
|