Packagenochump.util.zip
Classpublic class Deflater

This is the Deflater class. The deflater class compresses input with the deflate algorithm described in RFC 1951. It uses the ByteArray compress method to deflate.



Public Methods
 MethodDefined by
  
Creates a new deflater.
Deflater
  
deflate(output:ByteArray):uint
Deflates the current input block to the given array.
Deflater
  
getBytesRead():uint
Gets the number of input bytes.
Deflater
  
Gets the number of output bytes.
Deflater
  
reset():void
Resets the deflater.
Deflater
  
setInput(input:ByteArray):void
Sets the data which should be compressed next.
Deflater
Constructor detail
Deflater()constructor
public function Deflater()

Creates a new deflater.

Method detail
deflate()method
public function deflate(output:ByteArray):uint

Deflates the current input block to the given array.

Parameters
output:ByteArray — the buffer where to write the compressed data.

Returns
uint
getBytesRead()method 
public function getBytesRead():uint

Gets the number of input bytes.

Returns
uint
getBytesWritten()method 
public function getBytesWritten():uint

Gets the number of output bytes.

Returns
uint
reset()method 
public function reset():void

Resets the deflater. The deflater acts afterwards as if it was just created.

setInput()method 
public function setInput(input:ByteArray):void

Sets the data which should be compressed next.

Parameters
input:ByteArray — the buffer containing the input data.