com.nimbusds.jose.util
Class DeflateUtils

java.lang.Object
  extended by com.nimbusds.jose.util.DeflateUtils

public class DeflateUtils
extends java.lang.Object

Deflate (RFC 1951) utilities.

Version:
$version$ (2012-09-17)
Author:
Vladimir Dzhuvinov

Method Summary
static byte[] compress(byte[] bytes)
          Compresses the specified byte array according to the DEFLATE specification (RFC 1951).
static byte[] decompress(byte[] bytes)
          Decompresses the specified byte array according to the DEFLATE specification (RFC 1951).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compress

public static byte[] compress(byte[] bytes)
                       throws java.io.IOException
Compresses the specified byte array according to the DEFLATE specification (RFC 1951).

Parameters:
bytes - The byte array to compress. Must not be null.
Returns:
The compressed bytes.
Throws:
java.io.IOException - If compression failed.

decompress

public static byte[] decompress(byte[] bytes)
                         throws java.io.IOException
Decompresses the specified byte array according to the DEFLATE specification (RFC 1951).

Parameters:
bytes - The byte array to decompress. Must not be null.
Returns:
The decompressed bytes.
Throws:
java.io.IOException - If decompression failed.


Copyright © 2013 NimbusDS. All Rights Reserved.