[ https://issues.apache.org/jira/browse/BEAM-8564?focusedWorklogId=369329&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-369329 ]
ASF GitHub Bot logged work on BEAM-8564: ---------------------------------------- Author: ASF GitHub Bot Created on: 09/Jan/20 20:05 Start Date: 09/Jan/20 20:05 Worklog Time Spent: 10m Work Description: lukecwik commented on pull request #10254: [BEAM-8564] Add LZO compression and decompression support URL: https://github.com/apache/beam/pull/10254#discussion_r364924751 ########## File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/Compression.java ########## @@ -152,6 +156,38 @@ public WritableByteChannel writeCompressed(WritableByteChannel channel) throws I } }, + /** + * LZO compression using LZO Codec. .lzo_deflate extension is specified for the files which just + * use the LZO algorithm without headers. + */ + LZO(".lzo_deflate", ".lzo_deflate") { + @Override + public ReadableByteChannel readDecompressed(ReadableByteChannel channel) throws IOException { + return Channels.newChannel(new LzoCompressorInputStream(Channels.newInputStream(channel))); + } + + @Override + public WritableByteChannel writeCompressed(WritableByteChannel channel) throws IOException { + return Channels.newChannel(new LzoCompressorOutputStream(Channels.newOutputStream(channel))); + } + }, + + /** + * LZOP compression using LZOP Codec. .lzo extension is specified for the files with magic bytes + * and headers. + */ + LZOP(".lzo", ".lzo") { + @Override + public ReadableByteChannel readDecompressed(ReadableByteChannel channel) throws IOException { + return Channels.newChannel(new LzopCompressorInputStream(Channels.newInputStream(channel))); Review comment: Why do you need LzoCompressorInputStream class at all? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 369329) Time Spent: 6.5h (was: 6h 20m) > Add LZO compression and decompression support > --------------------------------------------- > > Key: BEAM-8564 > URL: https://issues.apache.org/jira/browse/BEAM-8564 > Project: Beam > Issue Type: New Feature > Components: sdk-java-core > Reporter: Amogh Tiwari > Assignee: Amogh Tiwari > Priority: Minor > Time Spent: 6.5h > Remaining Estimate: 0h > > LZO is a lossless data compression algorithm which is focused on compression > and decompression speeds. > This will enable Apache Beam sdk to compress/decompress files using LZO > compression algorithm. > This will include the following functionalities: > # compress() : for compressing files into an LZO archive > # decompress() : for decompressing files archived using LZO compression > Appropriate Input and Output stream will also be added to enable working with > LZO files. -- This message was sent by Atlassian Jira (v8.3.4#803005)