Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-9648

[C++] LZ4 compression level not supported

    XMLWordPrintableJSON

Details

    Description

      Hi,

      I am currently checking the different compression codecs available when writing parquet files.

      Testing LZ4, I got the error message that compression level is not supported.

      
      from pyarrow import parquet as pq
      
      pq.write_table(data, file, compression='LZ4', compression_level=12)
      
      

      Error message

      
      
       File "pyarrow/_parquet.pyx", line 1374, in pyarrow._parquet.ParquetWriter.write_table
      
      File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
      
      OSError: Invalid: LZ4 doesn't support setting a compression level.
      
      

      However man page of LZ4 states the following

      
      Operation modifiers
       -# Compression level, with # being any value from 1 to 12. Higher
       values trade compression speed for compression ratio. Values
       above 12 are considered the same as 12. Recommended values are 1
       for fast compression (default), and 9 for high compression.
       Speed/compression trade-off will vary depending on data to com‐
       press. Decompression speed remains fast at all settings.
      
      

      Please, can you activate compression levels for LZ4?

      Thanks,

      Bests

       

      Attachments

        Issue Links

          Activity

            People

              joosthooz Joost Hoozemans
              Yohplala Pierre
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 5h 10m
                  5h 10m