| 232 | } |
| 233 | |
| 234 | bool Codec::IsAvailable(Compression::type codec_type) { |
| 235 | switch (codec_type) { |
| 236 | case Compression::UNCOMPRESSED: |
| 237 | return true; |
| 238 | case Compression::SNAPPY: |
| 239 | #ifdef ARROW_WITH_SNAPPY |
| 240 | return true; |
| 241 | #else |
| 242 | return false; |
| 243 | #endif |
| 244 | case Compression::GZIP: |
| 245 | #ifdef ARROW_WITH_ZLIB |
| 246 | return true; |
| 247 | #else |
| 248 | return false; |
| 249 | #endif |
| 250 | case Compression::LZO: |
| 251 | return false; |
| 252 | case Compression::BROTLI: |
| 253 | #ifdef ARROW_WITH_BROTLI |
| 254 | return true; |
| 255 | #else |
| 256 | return false; |
| 257 | #endif |
| 258 | case Compression::LZ4: |
| 259 | case Compression::LZ4_FRAME: |
| 260 | case Compression::LZ4_HADOOP: |
| 261 | #ifdef ARROW_WITH_LZ4 |
| 262 | return true; |
| 263 | #else |
| 264 | return false; |
| 265 | #endif |
| 266 | case Compression::ZSTD: |
| 267 | #ifdef ARROW_WITH_ZSTD |
| 268 | return true; |
| 269 | #else |
| 270 | return false; |
| 271 | #endif |
| 272 | case Compression::BZ2: |
| 273 | #ifdef ARROW_WITH_BZ2 |
| 274 | return true; |
| 275 | #else |
| 276 | return false; |
| 277 | #endif |
| 278 | default: |
| 279 | return false; |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | } // namespace util |
| 284 | } // namespace arrow |
nothing calls this directly
no outgoing calls
no test coverage detected