All in memory inflater / deflator for small chunks using streams.
More...
|
| static byte[] | inflateFromStream (final InputStream in) throws IOException, ArrayIndexOutOfBoundsException, IllegalArgumentException |
| |
| static byte[] | inflateFromStream (final InputStream in, final int inLen, final int outLen, final byte[] output, final int outOff) throws IOException, ArrayIndexOutOfBoundsException, IllegalArgumentException |
| |
| static int | deflateToStream (final byte[] input, final int inOff, final int inLen, final int level, final OutputStream out) throws IOException, ArrayIndexOutOfBoundsException, IllegalArgumentException |
| |
|
| static final int | MAGIC = 0xDEF1A7E0 |
| | Start of stream header for deflated data. More...
|
| |
All in memory inflater / deflator for small chunks using streams.
Stream header of deflated data:
-
4 bytes magic 0xDEF1A7E0 (Big Endian)
-
4 bytes integer deflated-size (Big Endian)
-
4 bytes integer inflated-size (Big Endian)
-
deflated bytes
Definition at line 51 of file CustomCompress.java.
◆ deflateToStream()
| static int com.jogamp.common.util.CustomCompress.deflateToStream |
( |
final byte[] |
input, |
|
|
final int |
inOff, |
|
|
final int |
inLen, |
|
|
final int |
level, |
|
|
final OutputStream |
out |
|
) |
| throws IOException, ArrayIndexOutOfBoundsException, IllegalArgumentException |
|
static |
- Parameters
-
| input | raw input bytes |
| inOff | offset to input |
| inLen | number of input bytes at inOff |
| level | compression level 0-9 or Deflater#DEFAULT_COMPRESSION |
| out | sink for deflated bytes |
- Returns
- number of deflated bytes written, not including the header.
- Exceptions
-
| IOException | if an I/O or deflation exception occurs |
| ArrayIndexOutOfBoundsException | if inOff and inLen exceeds input |
| IllegalArgumentException | if inLen ≤ 0 |
Definition at line 143 of file CustomCompress.java.
◆ inflateFromStream() [1/2]
| static byte[] com.jogamp.common.util.CustomCompress.inflateFromStream |
( |
final InputStream |
in | ) |
throws IOException, ArrayIndexOutOfBoundsException, IllegalArgumentException |
|
static |
- Parameters
-
- Returns
- the inflated bytes from the stream
- Exceptions
-
| IOException | if an I/O or deflation exception occurs |
| IllegalArgumentException | if inLen ≤ 0 or outLen ≤ 0, as read from header |
Definition at line 62 of file CustomCompress.java.
◆ inflateFromStream() [2/2]
| static byte[] com.jogamp.common.util.CustomCompress.inflateFromStream |
( |
final InputStream |
in, |
|
|
final int |
inLen, |
|
|
final int |
outLen, |
|
|
final byte[] |
output, |
|
|
final int |
outOff |
|
) |
| throws IOException, ArrayIndexOutOfBoundsException, IllegalArgumentException |
|
static |
- Parameters
-
| in | InputStream at start of deflated bytes, i.e. after the stream header. |
| inLen | number of deflated bytes in stream in |
| outLen | number of inflated output bytes at outOff |
| output | sink for deflated bytes |
| outOff | offset to output |
- Returns
- the inflated bytes from the stream, passing
output for chaining
- Exceptions
-
| IOException | if an I/O or deflation exception occurs |
| ArrayIndexOutOfBoundsException | if outOff and outLen exceeds output |
| IllegalArgumentException | if inLen ≤ 0 or outLen ≤ 0 |
Definition at line 91 of file CustomCompress.java.
◆ MAGIC
| final int com.jogamp.common.util.CustomCompress.MAGIC = 0xDEF1A7E0 |
|
static |
The documentation for this class was generated from the following file: