Class Bzip2DecompressionCodec
java.lang.Object
org.elasticsearch.xpack.esql.datasource.bzip2.Bzip2DecompressionCodec
- All Implemented Interfaces:
DecompressionCodec,SplittableDecompressionCodec
Bzip2 decompression codec with splittable support for parallel decompression.
Uses a forked Hadoop-style CBZip2InputStream in BYBLOCK mode for split
decompression. The decompressor handles bit-aligned block boundaries natively via
skipToNextMarker(), avoiding the need for byte-aligned block offsets.
For split decompression, the stream is positioned at the byte containing the
block marker. The CBZip2InputStream in BYBLOCK mode finds the exact bit
position, decompresses one block at a time, and reports compressed byte positions
at block boundaries. A wrapper monitors these positions and signals EOF when the
decompressor passes the split boundary.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecompress(InputStream raw) decompressRange(StorageObject object, long blockStart, long nextBlockStart) long[]findBlockBoundaries(StorageObject object, long start, long end) name()
-
Constructor Details
-
Bzip2DecompressionCodec
public Bzip2DecompressionCodec()
-
-
Method Details
-
name
- Specified by:
namein interfaceDecompressionCodec
-
extensions
- Specified by:
extensionsin interfaceDecompressionCodec
-
decompress
- Specified by:
decompressin interfaceDecompressionCodec- Throws:
IOException
-
findBlockBoundaries
- Specified by:
findBlockBoundariesin interfaceSplittableDecompressionCodec- Throws:
IOException
-
decompressRange
public InputStream decompressRange(StorageObject object, long blockStart, long nextBlockStart) throws IOException - Specified by:
decompressRangein interfaceSplittableDecompressionCodec- Throws:
IOException
-