use of org.apache.commons.compress.compressors.deflate.DeflateCompressorInputStream in project beam by apache.
the class FileBasedSinkTest method testCompressionTypeDEFLATE.
/** {@link CompressionType#DEFLATE} correctly writes deflate data. */
@Test
public void testCompressionTypeDEFLATE() throws FileNotFoundException, IOException {
final File file = writeValuesWithWritableByteChannelFactory(CompressionType.DEFLATE, "abc", "123");
// Read Gzipped data back in using standard API.
assertReadValues(new BufferedReader(new InputStreamReader(new DeflateCompressorInputStream(new FileInputStream(file)), StandardCharsets.UTF_8.name())), "abc", "123");
}
Aggregations