Examples of decompress()


Examples of ca.eandb.jmist.framework.loader.openexr.attribute.CompressionMethod.decompress()

        int blockSize = computeTileSize(block);

        IIOByteBuffer buf = new IIOByteBuffer(null, 0, 0);
        source.readBytes(buf, size);
        if (size < blockSize) {
          cm.decompress(buf, block);
          if (buf.getLength() < blockSize) {
            throw new RuntimeException("Undersized block");
          }
        }
        f.write(buf.getData(), buf.getOffset(), buf.getLength());
View Full Code Here

Examples of com.alibaba.otter.node.etl.common.io.compress.Compressor.decompress()

            for (int i = 0; i < comps.length; i++) {
                ByteArrayInputStream input = new ByteArrayInputStream(data);
                Compressor comp = comps[i];
                // 基于流的处理
                InputStream encrypt = comp.compress(input);
                InputStream decrypt = comp.decompress(encrypt);
                result = NioUtils.read(decrypt);
                check(data, result);
                encrypt.close();
                decrypt.close();
            }
View Full Code Here

Examples of com.facebook.hive.orc.compression.CompressionCodec.decompress()

    buf.put(new byte[]{127,-128,0,99,98,-1});
    buf.flip();
    CompressionCodec codec = new ZlibCodec();
    ByteBuffer out = ByteBuffer.allocate(1000);
    try {
      codec.decompress(buf, out);
      fail();
    } catch (IOException ioe) {
      // EXPECTED
    }
  }
View Full Code Here

Examples of com.facebook.hive.orc.compression.ZlibCodec.decompress()

    buf.put(new byte[]{127,-128,0,99,98,-1});
    buf.flip();
    CompressionCodec codec = new ZlibCodec();
    ByteBuffer out = ByteBuffer.allocate(1000);
    try {
      codec.decompress(buf, out);
      fail();
    } catch (IOException ioe) {
      // EXPECTED
    }
  }
View Full Code Here

Examples of com.ibm.icu.text.UnicodeDecompressor.decompress()

        int [] bytesRead = new int[1];
        char [] charBuffer = new char [2*(segment1.length + segment2.length)];
        int count1 = 0, count2 = 0;

        count1 = myDecompressor.decompress(segment1, 0, segment1.length,
                                           bytesRead,
                                           charBuffer, 0, charBuffer.length);
       
        logln("Segment 1 (" + segment1.length + " bytes) " +
                "decompressed into " + count1  + " chars");
View Full Code Here

Examples of com.ibm.icu.text.UnicodeDecompressor.decompress()

        logln("Got chars: ");
        logln(charBuffer, 0, count1);
        s.append(charBuffer, 0, count1);

        count2 = myDecompressor.decompress(segment2, 0, segment2.length,
                                           bytesRead,
                                           charBuffer, count1,
                                           charBuffer.length);
       
        logln("Segment 2 (" + segment2.length + " bytes) " +
View Full Code Here

Examples of com.ibm.icu.text.UnicodeDecompressor.decompress()

        int[] bytesRead = new int[1];
       
        myByteCount = myCompressor.compress(chars, 0, len, unicharsRead,
                myCompressed, 0, myCompressedSize);

        myCharCount = myDecompressor.decompress(myCompressed, 0, myByteCount,
                bytesRead, myDecompressed, 0, myDecompressedSize);

        if (logDiffs(chars, len, myDecompressed, myCharCount) == false) {
            logln(len + " chars ===> "
                    + myByteCount + " bytes ===> "
View Full Code Here

Examples of com.ibm.icu.text.UnicodeDecompressor.decompress()

       
        // perform the decompression in a loop
        do {
           
            // do the decompression
            unicharsWritten = myDecompressor.decompress(compressed,
                    totalBytesDecompressed, totalBytesWritten,
                    bytesRead, unicharBuffer, 0, unicharBufferSize);

            // copy the current set of chars into the target buffer
            System.arraycopy(unicharBuffer, 0, decompressed,
View Full Code Here

Examples of freenet.support.compress.Compressor.COMPRESSOR_TYPE.decompress()

            Bucket inputBucket = new SimpleReadOnlyArrayBucket(input, inputOffset, inputLength-inputOffset);
            Bucket outputBucket = bf.makeBucket(maxLength);
            outputStream = outputBucket.getOutputStream();
            inputStream = inputBucket.getInputStream();
            try {
              decompressor.decompress(inputStream, outputStream, maxLength, -1);
      catch (CompressionOutputSizeException e) {
        throw new TooBigException("Too big");
      } finally {
            inputStream.close();
            outputStream.close();
View Full Code Here

Examples of net.jpountz.lz4.LZ4Decompressor.decompress()

      LZ4Decompressor decompressor = lz4Factory.decompressor();

      int size = ByteBuffer.wrap(in).getInt();

      out = new byte[size];
      decompressor.decompress(in, Ints.BYTES, out, 0, out.length);
    }
    return out == null ? null : out;
  }
}
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.