Class CompressorUtils

java.lang.Object
org.apache.flink.runtime.io.compression.CompressorUtils

public class CompressorUtils extends Object
Utils for BlockCompressor.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    We put two integers before each compressed block, the first integer represents the compressed length of the block, and the second one represents the original length of the block.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    readIntLE(byte[] buf, int i)
     
    static void
    validateLength(int compressedLen, int originalLen)
     
    static void
    writeIntLE(int i, byte[] buf, int offset)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • HEADER_LENGTH

      public static final int HEADER_LENGTH
      We put two integers before each compressed block, the first integer represents the compressed length of the block, and the second one represents the original length of the block.
      See Also:
  • Constructor Details

    • CompressorUtils

      public CompressorUtils()
  • Method Details

    • writeIntLE

      public static void writeIntLE(int i, byte[] buf, int offset)
    • readIntLE

      public static int readIntLE(byte[] buf, int i)
    • validateLength

      public static void validateLength(int compressedLen, int originalLen) throws BufferDecompressionException
      Throws:
      BufferDecompressionException