You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CodecZlibNG.jl is an experimental alternative to [CodecZlib.jl](https://github.com/JuliaIO/CodecZlib.jl) that wraps the [zlib-ng](https://github.com/zlib-ng/zlib-ng) C library.
8
+
3
9
## Installation
4
10
5
11
```julia
@@ -45,4 +51,4 @@ This package exports following codecs and streams:
Copy file name to clipboardExpand all lines: src/compression.jl
+65-34Lines changed: 65 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -24,15 +24,18 @@ Create a gzip compression codec.
24
24
25
25
Arguments
26
26
---------
27
-
- `level`: compression level (-1..9)
28
-
- `windowbits`: size of history buffer (8..15)
27
+
- `level` (-1..9): compression level. 1 gives best speed, 9 gives best compression, 0 gives no compression at all (the input data is simply copied a block at a time). -1 requests a default compromise between speed and compression (currently equivalent to level 6).
28
+
- `windowbits` (9..15): size of history buffer is `2^windowbits`.
29
+
30
+
!!! warning
31
+
`serialize` and `deepcopy` will not work with this codec due to stored raw pointers.
@@ -68,15 +74,18 @@ Create a zlib compression codec.
68
74
69
75
Arguments
70
76
---------
71
-
- `level`: compression level (-1..9)
72
-
- `windowbits`: size of history buffer (8..15)
77
+
- `level` (-1..9): compression level. 1 gives best speed, 9 gives best compression, 0 gives no compression at all (the input data is simply copied a block at a time). -1 requests a default compromise between speed and compression (currently equivalent to level 6).
78
+
- `windowbits` (9..15): size of history buffer is `2^windowbits`.
79
+
80
+
!!! warning
81
+
`serialize` and `deepcopy` will not work with this codec due to stored raw pointers.
- `level` (-1..9): compression level. 1 gives best speed, 9 gives best compression, 0 gives no compression at all (the input data is simply copied a block at a time). -1 requests a default compromise between speed and compression (currently equivalent to level 6).
128
+
- `windowbits` (9..15): size of history buffer is `2^windowbits`.
117
129
- `memlevel`: memory size used for internal compression state (1..9)
118
130
- `strategy`: compression strategy
119
131
* 0 <-> Z_DEFAULT_STRATEGY
120
132
* 1 <-> Z_FILTERED
121
133
* 2 <-> Z_HUFFMAN_ONLY
122
134
* 3 <-> Z_RLE
123
135
* 4 <-> Z_FIXED
136
+
137
+
!!! warning
138
+
`serialize` and `deepcopy` will not work with this codec due to stored raw pointers.
124
139
"""
125
140
functionDeflateCompressor(;
126
141
level::Integer=Z_DEFAULT_COMPRESSION,
@@ -130,8 +145,8 @@ function DeflateCompressor(;
130
145
)
131
146
if!(-1≤ level ≤9)
132
147
throw(ArgumentError("compression level must be within -1..9"))
133
-
elseif!(8≤ windowbits ≤15)
134
-
throw(ArgumentError("windowbits must be within 8..15"))
148
+
elseif!(9≤ windowbits ≤15)
149
+
throw(ArgumentError("windowbits must be within 9..15"))
135
150
elseif!(1≤ memlevel ≤9)
136
151
throw(ArgumentError("memlevel must be within 1..9"))
137
152
elseif!(0≤ strategy ≤4)
@@ -156,14 +171,6 @@ end
156
171
# Methods
157
172
# -------
158
173
159
-
function TranscodingStreams.initialize(codec::CompressorCodec)
0 commit comments