Class StreamCompressionSerializer


  • public class StreamCompressionSerializer
    extends java.lang.Object
    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 Detail

      • StreamCompressionSerializer

        public StreamCompressionSerializer​(io.netty.buffer.ByteBufAllocator allocator)
    • Method Detail

      • serialize

        public static StreamingDataOutputPlus.Write serialize​(net.jpountz.lz4.LZ4Compressor compressor,
                                                              java.nio.ByteBuffer in,
                                                              int version)
      • deserialize

        public io.netty.buffer.ByteBuf deserialize​(net.jpountz.lz4.LZ4SafeDecompressor decompressor,
                                                   DataInputPlus in,
                                                   int version)
                                            throws java.io.IOException
        Returns:
        A buffer with decompressed data.
        Throws:
        java.io.IOException