1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# | [`futures::io::AsyncBufRead`](futures_io::AsyncBufRead)"
)]
#![cfg_attr(
not(feature = "futures-bufread"),
doc = "`futures-bufread` (*inactive*) | `futures::io::AsyncBufRead`"
)]
# | [`futures::io::AsyncWrite`](futures_io::AsyncWrite)"
)]
#![cfg_attr(
not(feature = "futures-write"),
doc = "`futures-write` (*inactive*) | `futures::io::AsyncWrite`"
)]
#![cfg_attr(
feature = "stream",
doc = "[`stream`] | [`futures::stream::Stream`](futures_core::stream::Stream)`<Item = `[`std::io::Result`]`<`[`bytes::Bytes`]`>>`"
)]
#![cfg_attr(
not(feature = "stream"),
doc = "`stream` (*inactive*) | `futures::stream::Stream<Item = std::io::Result<bytes::Bytes>>`"
)]
#, [`BrotliDecoder`](?search=BrotliDecoder)"
)]
#![cfg_attr(
not(feature = "brotli"),
doc = "`brotli` (*inactive*) | `BrotliEncoder`, `BrotliDecoder`"
)]
#, [`BzDecoder`](?search=BzDecoder)"
)]
#![cfg_attr(
not(feature = "bzip2"),
doc = "`bzip2` (*inactive*) | `BzEncoder`, `BzDecoder`"
)]
#, [`DeflateDecoder`](?search=DeflateDecoder)"
)]
#![cfg_attr(
not(feature = "deflate"),
doc = "`deflate` (*inactive*) | `DeflateEncoder`, `DeflateDecoder`"
)]
#, [`GzipDecoder`](?search=GzipDecoder)"
)]
#![cfg_attr(
not(feature = "gzip"),
doc = "`gzip` (*inactive*) | `GzipEncoder`, `GzipDecoder`"
)]
#, [`ZlibDecoder`](?search=ZlibDecoder)"
)]
#![cfg_attr(
not(feature = "zlib"),
doc = "`zlib` (*inactive*) | `ZlibEncoder`, `ZlibDecoder`"
)]
#, [`ZstdDecoder`](?search=ZstdDecoder)"
)]
#![cfg_attr(
not(feature = "zstd"),
doc = "`zstd` (*inactive*) | `ZstdEncoder`, `ZstdDecoder`"
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(
missing_docs,
rust_2018_idioms,
missing_copy_implementations,
missing_debug_implementations
)]
#[macro_use]
mod macros;
mod codec;
#[cfg(any(feature = "futures-bufread", feature = "futures-write"))]
pub mod futures;
#[cfg(feature = "stream")]
#[cfg_attr(docsrs, doc(cfg(feature = "stream")))]
pub mod stream;
#[cfg(feature = "bufread")]
#[doc(hidden)]
#[deprecated(
since = "0.1.1",
note = "Please switch to the `futures-bufread` feature and `async_compression::futures::bufread` module instead"
)]
pub use crate::futures::bufread;
#[cfg(feature = "write")]
#[doc(hidden)]
#[deprecated(
since = "0.1.1",
note = "Please switch to the `futures-write` feature and `async_compression::futures::write` module instead"
)]
pub use crate::futures::write;
#[cfg(feature = "flate2")]
#[cfg_attr(
docsrs,
doc(cfg(any(feature = "deflate", feature = "zlib", feature = "gzip")))
)]
pub mod flate2 {
pub use flate2::Compression;
}
#[cfg(feature = "brotli")]
#[cfg_attr(docsrs, doc(cfg(feature = "brotli")))]
pub mod brotli2 {
pub use brotli2::CompressParams;
}
#[cfg(feature = "bzip2")]
#[cfg_attr(docsrs, doc(cfg(feature = "bzip2")))]
pub mod bzip2 {
pub use bzip2::Compression;
}
mod unshared;
mod util;