Examples of LZFChunk


Examples of com.ning.compress.lzf.LZFChunk

    /** {@inheritDoc} */
    @Override
    public void run() {
        try {
            LZFChunk lzfChunk = lzfFuture.get();
            while (lzfChunk != null) {
                output.write(lzfChunk.getData());
                lzfChunk = lzfChunk.next();
            }
        } catch (Exception e) {
            caller.writeException = e;
        }
    }
View Full Code Here

Examples of com.ning.compress.lzf.LZFChunk

  /** {@inheritDoc} */
  @Override
  public LZFChunk call() {
    if (data != null) {
      LZFChunk lzfChunk = ENCODER.get().encodeChunk(data, offset, length);
      // input data is fully processed, we can now discard it
      blockManager.releaseBlockToPool(data);
      return lzfChunk;
    } else {
      // cleanup time!
View Full Code Here

Examples of com.ning.compress.lzf.LZFChunk

  {
    @Override
    public byte[] compress(byte[] bytes)
    {
      final ResourceHolder<ChunkEncoder> encoder = CompressedPools.getChunkEncoder();
      LZFChunk chunk = encoder.get().encodeChunk(bytes, 0, bytes.length);
      CloseQuietly.close(encoder);

      return chunk.getData();
    }
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.