Deflate class

Constructors

Deflate(List<int> bytes, {int level: DEFAULT_COMPRESSION, int flush: FINISH, dynamic output})
Deflate.buffer(dynamic _input, {int level: DEFAULT_COMPRESSION, int flush: FINISH, dynamic output})

Properties

crc32 int
read / write
level int
Compression level used (1..9)
read-only
total int
Read a buffer from the current input stream, update the adler32 and total number of bytes read. All deflate() input goes through this function so some applications may wish to modify it to avoid allocating a large strm->next_in buffer and copying from it. (See also flush_pending()).
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

addBuffer(InputStream buffer, {int flush: FINISH}) → void
Add more data to be deflated.
addBytes(List<int> bytes, {int flush: FINISH}) → void
Add more data to be deflated.
biFlush() → void
Flush the bit buffer, keeping at most 7 bits in it.
finish() → void
getBytes() List<int>
Get the resulting compressed bytes.
setDataType() → void
Set the data type to ASCII or BINARY, using a crude approximation: binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise. IN assertion: the fields freq of dyn_ltree are set and the total of all frequencies does not exceed 64K (to fit in an int on 16 bit machines).
takeBytes() List<int>
Get the resulting compressed bytes without storing the resulting data to minimize memory usage.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

BEST_COMPRESSION → const int
9
BEST_SPEED → const int
1
BL_CODES → const int
19
BLOCK_DONE → const int
block flush performed
1
BUF_SIZE → const int
8 * 2
BUSY_STATE → const int
113
D_CODES → const int
30
DEF_MEM_LEVEL → const int
8
DEFAULT_COMPRESSION → const int
6
DYN_TREES → const int
2
END_BLOCK → const int
256
FAST → const int
1
FINISH → const int
4
FINISH_DONE → const int
finish done, accept no more input or output
3
FINISH_STARTED → const int
finish started, need only more output at next deflate
2
FINISH_STATE → const int
666
FULL_FLUSH → const int
3
HEAP_SIZE → const int
(2 * L_CODES + 1)
INIT_STATE → const int
42
L_CODES → const int
(LITERALS + 1 + LENGTH_CODES)
LENGTH_CODES → const int
29
LITERALS → const int
256
MAX_BITS → const int
15
MAX_MATCH → const int
258
MAX_MEM_LEVEL → const int
9
MAX_WBITS → const int
32K LZ77 window
15
MIN_LOOKAHEAD → const int
(MAX_MATCH + MIN_MATCH + 1)
MIN_MATCH → const int
3
NEED_MORE → const int
block not completed, need more input or more output
0
NO_COMPRESSION → const int
0
NO_FLUSH → const int
0
PARTIAL_FLUSH → const int
1
REP_3_6 → const int
repeat previous bit length 3-6 times (2 bits of repeat count)
16
REPZ_3_10 → const int
repeat a zero length 3-10 times (3 bits of repeat count)
17
REPZ_11_138 → const int
repeat a zero length 11-138 times (7 bits of repeat count)
18
SLOW → const int
2
STATIC_TREES → const int
1
STORED → const int
0
STORED_BLOCK → const int
0
SYNC_FLUSH → const int
2
Z_ASCII → const int
1
Z_BINARY → const int
0
Z_BUF_ERROR → const int
-5
Z_DATA_ERROR → const int
-3
Z_DEFAULT_COMPRESSION → const int
-1
Z_DEFAULT_STRATEGY → const int
0
Z_DEFLATED → const int
The deflate compression method
8
Z_ERRNO → const int
-1
Z_FILTERED → const int
1
Z_HUFFMAN_ONLY → const int
2
Z_MEM_ERROR → const int
-4
Z_NEED_DICT → const int
2
Z_OK → const int
0
Z_STREAM_END → const int
1
Z_STREAM_ERROR → const int
-2
Z_UNKNOWN → const int
2
Z_VERSION_ERROR → const int
-6