# Class Deflater

java.lang.Object
com.codename1.io.gzip.ZStream
com.codename1.io.gzip.Deflater

public final class Deflater extends ZStream

- ## Field Summary

  ### Fields inherited from class ZStream

  `availIn, availOut, msg, nextIn, nextInIndex, nextOut, nextOutIndex, totalIn, totalOut`
  Modifier and Type
  Field
  Description
  `int`
  `availIn`
  Deprecated.
  `int`
  `availOut`
  Deprecated.
  `String`
  `msg`
  Deprecated.
  `byte[]`
  `nextIn`
  Deprecated.
  `int`
  `nextInIndex`
  Deprecated.
  `byte[]`
  `nextOut`
  Deprecated.
  `int`
  `nextOutIndex`
  Deprecated.
  `long`
  `totalIn`
  Deprecated.
  `long`
  `totalOut`
  Deprecated.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Deflater()`
  `Deflater(int level)`
  `Deflater(int level, boolean nowrap)`
  `Deflater(int level, int bits)`
  `Deflater(int level, int bits, boolean nowrap)`
  `Deflater(int level, int bits, int memlevel)`
  `Deflater(int level, int bits, int memlevel, com.codename1.io.gzip.JZlib.WrapperType wrapperType)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `copy(Deflater src)`
  `int`
  `deflate(int flush)`
  `int`
  `end()`
  Those methods are expected to be override by Inflater and Deflater.
  `boolean`
  `finished()`
  `int`
  `init(int level)`
  `int`
  `init(int level, boolean nowrap)`
  `int`
  `init(int level, int bits)`
  `int`
  `init(int level, int bits, boolean nowrap)`
  `int`
  `init(int level, int bits, int memlevel)`
  `int`
  `init(int level, int bits, int memlevel, com.codename1.io.gzip.JZlib.WrapperType wrapperType)`
  `int`
  `params(int level, int strategy)`
  `int`
  `setDictionary(byte[] dictionary, int dictLength)`

  ### Methods inherited from class ZStream

  `deflateEnd, deflateInit, deflateInit, deflateInit, deflateInit, deflateInit, deflateInit, deflateParams, deflateSetDictionary, free, getAdler, getAvailIn, getAvailOut, getMessage, getNextIn, getNextInIndex, getNextOut, getNextOutIndex, getTotalIn, getTotalOut, inflate, inflateEnd, inflateFinished, inflateInit, inflateInit, inflateInit, inflateInit, inflateInit, inflateInit, inflateSetDictionary, inflateSync, inflateSyncPoint, setAvailIn, setAvailOut, setInput, setInput, setInput, setNextIn, setNextInIndex, setNextOut, setNextOutIndex, setOutput, setOutput`
  Modifier and Type
  Method
  Description
  `int`
  `deflateEnd()`
  Deprecated.
  `int`
  `deflateInit(int level)`
  Deprecated.
  `int`
  `deflateInit(int level, boolean nowrap)`
  Deprecated.
  `int`
  `deflateInit(int level, int bits)`
  Deprecated.
  `int`
  `deflateInit(int level, int bits, boolean nowrap)`
  Deprecated.
  `int`
  `deflateInit(int level, int bits, int memlevel)`
  Deprecated.
  `int`
  `deflateInit(int level, int bits, int memlevel, com.codename1.io.gzip.JZlib.WrapperType wrapperType)`
  Deprecated.
  `int`
  `deflateParams(int level, int strategy)`
  Deprecated.
  `int`
  `deflateSetDictionary(byte[] dictionary, int dictLength)`
  Deprecated.
  `void`
  `free()`
  Deprecated.
  `long`
  `getAdler()`
  Deprecated.
  `int`
  `getAvailIn()`
  Deprecated.
  `int`
  `getAvailOut()`
  Deprecated.
  `String`
  `getMessage()`
  Deprecated.
  `byte[]`
  `getNextIn()`
  Deprecated.
  `int`
  `getNextInIndex()`
  Deprecated.
  `byte[]`
  `getNextOut()`
  Deprecated.
  `int`
  `getNextOutIndex()`
  Deprecated.
  `long`
  `getTotalIn()`
  Deprecated.
  `long`
  `getTotalOut()`
  Deprecated.
  `int`
  `inflate(int f)`
  Deprecated.
  `int`
  `inflateEnd()`
  Deprecated.
  `boolean`
  `inflateFinished()`
  Deprecated.
  `int`
  `inflateInit()`
  Deprecated.
  `int`
  `inflateInit(boolean nowrap)`
  Deprecated.
  `int`
  `inflateInit(int w)`
  Deprecated.
  `int`
  `inflateInit(int w, boolean nowrap)`
  Deprecated.
  `int`
  `inflateInit(int w, com.codename1.io.gzip.JZlib.WrapperType wrapperType)`
  Deprecated.
  `int`
  `inflateInit(com.codename1.io.gzip.JZlib.WrapperType wrapperType)`
  Deprecated.
  `int`
  `inflateSetDictionary(byte[] dictionary, int dictLength)`
  Deprecated.
  `int`
  `inflateSync()`
  Deprecated.
  `int`
  `inflateSyncPoint()`
  Deprecated.
  `void`
  `setAvailIn(int availIn)`
  Deprecated.
  `void`
  `setAvailOut(int availOut)`
  Deprecated.
  `void`
  `setInput(byte[] buf)`
  Deprecated.
  `void`
  `setInput(byte[] buf, boolean append)`
  Deprecated.
  `void`
  `setInput(byte[] buf, int off, int len, boolean append)`
  Deprecated.
  `void`
  `setNextIn(byte[] nextIn)`
  Deprecated.
  `void`
  `setNextInIndex(int nextInIndex)`
  Deprecated.
  `void`
  `setNextOut(byte[] nextOut)`
  Deprecated.
  `void`
  `setNextOutIndex(int nextOutIndex)`
  Deprecated.
  `void`
  `setOutput(byte[] buf)`
  Deprecated.
  `void`
  `setOutput(byte[] buf, int off, int len)`
  Deprecated.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
  Modifier and Type
  Method
  Description
  `protected Object`
  `clone()`
  `boolean`
  `equals(Object obj)`
  Indicates whether some other object is "equal to" this one.
  `final Class`
  `getClass()`
  Returns the runtime class of an object.
  `int`
  `hashCode()`
  Returns a hash code value for the object.
  `final void`
  `notify()`
  Wakes up a single thread that is waiting on this object's monitor.
  `final void`
  `notifyAll()`
  Wakes up all threads that are waiting on this object's monitor.
  `String`
  `toString()`
  Returns a string representation of the object.
  `final void`
  `wait()`
  Causes current thread to wait until another thread invokes the method or the method for this object.
  `final void`
  `wait(long timeout)`
  Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.
  `final void`
  `wait(long timeout, int nanos)`
  Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

- ## Constructor Details

  - ### Deflater

    public Deflater()

  - ### Deflater

    public Deflater(int level) throws GZIPException
    Throws:
      `GZIPException`

  - ### Deflater

    public Deflater(int level, boolean nowrap) throws GZIPException
    Throws:
      `GZIPException`

  - ### Deflater

    public Deflater(int level, int bits) throws GZIPException
    Throws:
      `GZIPException`

  - ### Deflater

    public Deflater(int level, int bits, boolean nowrap) throws GZIPException
    Throws:
      `GZIPException`

  - ### Deflater

    public Deflater(int level, int bits, int memlevel, com.codename1.io.gzip.JZlib.WrapperType wrapperType) throws GZIPException
    Throws:
      `GZIPException`

  - ### Deflater

    public Deflater(int level, int bits, int memlevel) throws GZIPException
    Throws:
      `GZIPException`

- ## Method Details

  - ### init

    public int init(int level)

  - ### init

    public int init(int level, boolean nowrap)

  - ### init

    public int init(int level, int bits)

  - ### init

    public int init(int level, int bits, int memlevel, com.codename1.io.gzip.JZlib.WrapperType wrapperType)

  - ### init

    public int init(int level, int bits, int memlevel)

  - ### init

    public int init(int level, int bits, boolean nowrap)

  - ### deflate

    public int deflate(int flush)
    Overrides:
      `deflate` in class `ZStream`

  - ### end

    public int end()
    Description copied from class: `ZStream`
    Those methods are expected to be override by Inflater and Deflater. In the future, they will become abstract methods.
    Overrides:
      `end` in class `ZStream`

  - ### params

    public int params(int level, int strategy)

  - ### setDictionary

    public int setDictionary(byte[] dictionary, int dictLength)

  - ### finished

    public boolean finished()
    Overrides:
      `finished` in class `ZStream`

  - ### copy

    public int copy(Deflater src)