com.partnersoft.compression.zip
Class ZipLib

java.lang.Object
  extended by com.partnersoft.compression.zip.ZipLib
All Implemented Interfaces:
Lib

public final class ZipLib
extends java.lang.Object
implements Lib

Convenience functions for java.util.zip facilities.

Copyright 2009 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Method Summary
static byte[] deflate(byte[] input)
           
static byte[] deflate(byte[] input, int start, int length)
           
static DynamicByteArray deflate(DynamicByteArray input)
           
static int deflate(DynamicByteArray input, DynamicByteArray output)
          Compresses the bytes in the input array and places the results in the output array; returns the compressed byte size.
static byte[] inflate(byte[] input)
           
static byte[] inflate(byte[] input, int start, int length)
           
static DynamicByteArray inflate(DynamicByteArray input)
           
static int inflate(DynamicByteArray input, DynamicByteArray output)
          Decompresses the contents of the given input array and places the results in the given output array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

deflate

public static int deflate(DynamicByteArray input,
                          DynamicByteArray output)
Compresses the bytes in the input array and places the results in the output array; returns the compressed byte size.


deflate

public static DynamicByteArray deflate(DynamicByteArray input)

deflate

public static byte[] deflate(byte[] input,
                             int start,
                             int length)

deflate

public static byte[] deflate(byte[] input)

inflate

public static int inflate(DynamicByteArray input,
                          DynamicByteArray output)
                   throws java.util.zip.DataFormatException
Decompresses the contents of the given input array and places the results in the given output array. Returns the uncompressed byte size.

Throws:
java.util.zip.DataFormatException

inflate

public static DynamicByteArray inflate(DynamicByteArray input)
                                throws java.util.zip.DataFormatException
Throws:
java.util.zip.DataFormatException

inflate

public static byte[] inflate(byte[] input,
                             int start,
                             int length)
                      throws java.util.zip.DataFormatException
Throws:
java.util.zip.DataFormatException

inflate

public static byte[] inflate(byte[] input)
                      throws java.util.zip.DataFormatException
Throws:
java.util.zip.DataFormatException