Examples of LZ4BlockInputStream


Examples of net.jpountz.lz4.LZ4BlockInputStream

            }
            else
            {
                LZ4FastDecompressor decompressor = LZ4Factory.fastestInstance().fastDecompressor();
                Checksum checksum = XXHashFactory.fastestInstance().newStreamingHash32(OutboundTcpConnection.LZ4_HASH_SEED).asChecksum();
                in = new DataInputStream(new LZ4BlockInputStream(socket.getInputStream(),
                                                                 decompressor,
                                                                 checksum));
            }
        }
        else
View Full Code Here

Examples of net.jpountz.lz4.LZ4BlockInputStream

                in = new DataInputStream(new SnappyInputStream(socket.getInputStream()));
            else
            {
                LZ4FastDecompressor decompressor = LZ4Factory.fastestInstance().fastDecompressor();
                Checksum checksum = XXHashFactory.fastestInstance().newStreamingHash32(OutboundTcpConnection.LZ4_HASH_SEED).asChecksum();
                in = new DataInputStream(new LZ4BlockInputStream(socket.getInputStream(),
                                                                 decompressor,
                                                                 checksum));
            }
        }
        else
View Full Code Here

Examples of net.jpountz.lz4.LZ4BlockInputStream

        byte[] compressed = new byte[out.readableBytes()];
        out.readBytes(compressed);
        out.release();

        ByteArrayInputStream is = new ByteArrayInputStream(compressed);
        LZ4BlockInputStream lz4Is = new LZ4BlockInputStream(is);
        byte[] uncompressed = new byte[originalLength];
        int remaining = originalLength;
        while (remaining > 0) {
            int read = lz4Is.read(uncompressed, originalLength - remaining, remaining);
            if (read > 0) {
                remaining -= read;
            } else {
                break;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.