Class CompressorUtils
java.lang.Object
org.apache.flink.runtime.io.compression.CompressorUtils
Utils for
BlockCompressor.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intWe 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 -
Method Summary
Modifier and TypeMethodDescriptionstatic intreadIntLE(byte[] buf, int i) static voidvalidateLength(int compressedLen, int originalLen) static voidwriteIntLE(int i, byte[] buf, int offset)
-
Field Details
-
HEADER_LENGTH
public static final int HEADER_LENGTHWe 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
-