Examples of CompressionType


Examples of org.iq80.leveldb.CompressionType

        // close the block
        Slice raw = blockBuilder.finish();

        // attempt to compress the block
        Slice blockContents = raw;
        CompressionType blockCompressionType = CompressionType.NONE;
        if (compressionType == CompressionType.SNAPPY) {
            ensureCompressedOutputCapacity(maxCompressedLength(raw.length()));
            try {
                int compressedSize = Snappy.compress(raw.getRawArray(), raw.getRawOffset(), raw.length(), compressedOutput.getRawArray(), 0);
View Full Code Here

Examples of org.iq80.leveldb.CompressionType

    }

    public static BlockTrailer readBlockTrailer(Slice slice)
    {
        SliceInput sliceInput = slice.input();
        CompressionType compressionType = CompressionType.getCompressionTypeByPersistentId(sliceInput.readUnsignedByte());
        int crc32c = sliceInput.readInt();
        return new BlockTrailer(compressionType, crc32c);
    }
View Full Code Here

Examples of org.switchyard.serial.CompressionType

        assertContextProperty((ContextProperty)dc.getProperties().iterator().next());
    }

    private <T> T serDeser(T obj, Class<T> type) throws Exception {
        FormatType format = FormatType.JSON; //FormatType.XML_BEAN; //FormatType.SER_OBJECT;
        CompressionType compression = null; //CompressionType.ZIP; //CompressionType.GZIP;
        Serializer ser = SerializerFactory.create(format, compression, true);
        //ser.setPrettyPrint(true);
        byte[] bytes = ser.serialize(obj, type);
        //System.out.println(new String(bytes));
        return ser.deserialize(bytes, type);
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.