Class StreamCompressionSerializer
java.lang.Object
org.apache.cassandra.streaming.async.StreamCompressionSerializer
A serialiazer for stream compressed files (see package-level documentation). Much like a typical compressed
output stream, this class operates on buffers or chunks of the data at a a time. The format for each compressed
chunk is as follows:
- int - compressed payload length
- int - uncompressed payload length
- bytes - compressed payload
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.netty.buffer.ByteBufdeserialize(net.jpountz.lz4.LZ4SafeDecompressor decompressor, DataInputPlus in, int version) serialize(net.jpountz.lz4.LZ4Compressor compressor, ByteBuffer in, int version)
-
Constructor Details
-
StreamCompressionSerializer
public StreamCompressionSerializer(io.netty.buffer.ByteBufAllocator allocator)
-
-
Method Details
-
serialize
public static StreamingDataOutputPlus.Write serialize(net.jpountz.lz4.LZ4Compressor compressor, ByteBuffer in, int version) -
deserialize
public io.netty.buffer.ByteBuf deserialize(net.jpountz.lz4.LZ4SafeDecompressor decompressor, DataInputPlus in, int version) throws IOException - Returns:
- A buffer with decompressed data.
- Throws:
IOException
-