Re: Reading Data from zip/gzip
Posted by
Amit Jain on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Reading-Data-from-zip-gzip-tp23991p23993.html
Hi Chris,
FileInputFormat automatically takes cares of file decompression for the files with gzip, xz, bz2 and deflate extensions.
--
Thanks,
Amit
private static void initDefaultInflaterInputStreamFactories() {
InflaterInputStreamFactory<?>[] defaultFactories = {
DeflateInflaterInputStreamFactory.getInstance(),
GzipInflaterInputStreamFactory.getInstance(),
Bzip2InputStreamFactory.getInstance(),
XZInputStreamFactory.getInstance(),
};
for (InflaterInputStreamFactory<?> inputStreamFactory : defaultFactories) {
for (String fileExtension : inputStreamFactory.getCommonFileExtensions()) {
registerInflaterInputStreamFactory(fileExtension, inputStreamFactory);
}
}
}