Examples of LByteArray


Examples of xerial.larray.LByteArray

            long end = System.currentTimeMillis();
            _logger.debug("time:" + (end - start) + " sum:" + sum);
        }
        _logger.debug("compressing the data");
        int maxLen = Snappy.maxCompressedLength((int) l.byteLength());
        LByteArray compressedBuf = LArrayJ.newLByteArray(maxLen);
        long compressedLen = Snappy.rawCompress(l.address(), l.byteLength(),
                compressedBuf.address());
        LByteArray compressed = (LByteArray) compressedBuf.slice(0,
                compressedLen);
        File f = File.createTempFile("snappy", ".dat", new File("target"));
        f.deleteOnExit();
        compressed.saveTo(f);

        _logger.debug("decompressing the data");
        long T1 = System.currentTimeMillis();
        MappedLByteArray b = LArrayJ.mmap(f, 0, f.length(), MMapMode.READ_ONLY);
        long T2 = System.currentTimeMillis();
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.