@@ 12-28 (lines=17) @@ | ||
9 | * |
|
10 | * @author Joel Wurtz <[email protected]> |
|
11 | */ |
|
12 | class CompressStream extends FilteredStream |
|
13 | { |
|
14 | public function __construct(StreamInterface $stream, $level = -1) |
|
15 | { |
|
16 | parent::__construct($stream, ['window' => 15, 'level' => $level], ['window' => 15]); |
|
17 | } |
|
18 | ||
19 | public function getReadFilter() |
|
20 | { |
|
21 | return 'zlib.deflate'; |
|
22 | } |
|
23 | ||
24 | public function getWriteFilter() |
|
25 | { |
|
26 | return 'zlib.inflate'; |
|
27 | } |
|
28 | } |
|
29 |
@@ 12-28 (lines=17) @@ | ||
9 | * |
|
10 | * @author Joel Wurtz <[email protected]> |
|
11 | */ |
|
12 | class DecompressStream extends FilteredStream |
|
13 | { |
|
14 | public function __construct(StreamInterface $stream, $level = -1) |
|
15 | { |
|
16 | parent::__construct($stream, ['window' => 15], ['window' => 15, 'level' => $level]); |
|
17 | } |
|
18 | ||
19 | public function getReadFilter() |
|
20 | { |
|
21 | return 'zlib.inflate'; |
|
22 | } |
|
23 | ||
24 | public function getWriteFilter() |
|
25 | { |
|
26 | return 'zlib.deflate'; |
|
27 | } |
|
28 | } |
|
29 |
@@ 12-28 (lines=17) @@ | ||
9 | * |
|
10 | * @author Joel Wurtz <[email protected]> |
|
11 | */ |
|
12 | class DeflateStream extends FilteredStream |
|
13 | { |
|
14 | public function __construct(StreamInterface $stream, $level = -1) |
|
15 | { |
|
16 | parent::__construct($stream, ['window' => -15, 'level' => $level], ['window' => -15]); |
|
17 | } |
|
18 | ||
19 | public function getReadFilter() |
|
20 | { |
|
21 | return 'zlib.deflate'; |
|
22 | } |
|
23 | ||
24 | public function getWriteFilter() |
|
25 | { |
|
26 | return 'zlib.inflate'; |
|
27 | } |
|
28 | } |
|
29 |
@@ 12-28 (lines=17) @@ | ||
9 | * |
|
10 | * @author Joel Wurtz <[email protected]> |
|
11 | */ |
|
12 | class GzipDecodeStream extends FilteredStream |
|
13 | { |
|
14 | public function __construct(StreamInterface $stream, $level = -1) |
|
15 | { |
|
16 | parent::__construct($stream, ['window' => 31], ['window' => 31, 'level' => $level]); |
|
17 | } |
|
18 | ||
19 | public function getReadFilter() |
|
20 | { |
|
21 | return 'zlib.inflate'; |
|
22 | } |
|
23 | ||
24 | public function getWriteFilter() |
|
25 | { |
|
26 | return 'zlib.deflate'; |
|
27 | } |
|
28 | } |
|
29 |
@@ 12-28 (lines=17) @@ | ||
9 | * |
|
10 | * @author Joel Wurtz <[email protected]> |
|
11 | */ |
|
12 | class InflateStream extends FilteredStream |
|
13 | { |
|
14 | public function __construct(StreamInterface $stream, $level = -1) |
|
15 | { |
|
16 | parent::__construct($stream, ['window' => -15], ['window' => -15, 'level' => $level]); |
|
17 | } |
|
18 | ||
19 | public function getReadFilter() |
|
20 | { |
|
21 | return 'zlib.inflate'; |
|
22 | } |
|
23 | ||
24 | public function getWriteFilter() |
|
25 | { |
|
26 | return 'zlib.deflate'; |
|
27 | } |
|
28 | } |
|
29 |
@@ 12-34 (lines=23) @@ | ||
9 | * |
|
10 | * @author Joel Wurtz <[email protected]> |
|
11 | */ |
|
12 | class GzipEncodeStream extends FilteredStream |
|
13 | { |
|
14 | public function __construct(StreamInterface $stream, $level = -1) |
|
15 | { |
|
16 | parent::__construct($stream, ['window' => 31, 'level' => $level], ['window' => 31]); |
|
17 | } |
|
18 | ||
19 | /** |
|
20 | * {@inheritdoc} |
|
21 | */ |
|
22 | public function getReadFilter() |
|
23 | { |
|
24 | return 'zlib.deflate'; |
|
25 | } |
|
26 | ||
27 | /** |
|
28 | * {@inheritdoc} |
|
29 | */ |
|
30 | public function getWriteFilter() |
|
31 | { |
|
32 | return 'zlib.inflate'; |
|
33 | } |
|
34 | } |
|
35 |