========================================================================= */
(strm, dictionary, dictLength)
| 446 | |
| 447 | /* ========================================================================= */ |
| 448 | int ZEXPORT deflateGetDictionary (strm, dictionary, dictLength) |
| 449 | z_streamp strm; |
| 450 | Bytef *dictionary; |
| 451 | uInt *dictLength; |
| 452 | { |
| 453 | deflate_state *s; |
| 454 | uInt len; |
| 455 | |
| 456 | if (deflateStateCheck(strm)) |
| 457 | return Z_STREAM_ERROR; |
| 458 | s = strm->state; |
| 459 | len = s->strstart + s->lookahead; |
| 460 | if (len > s->w_size) |
| 461 | len = s->w_size; |
| 462 | if (dictionary != Z_NULL && len) |
| 463 | zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len); |
| 464 | if (dictLength != Z_NULL) |
| 465 | *dictLength = len; |
| 466 | return Z_OK; |
| 467 | } |
| 468 | |
| 469 | /* ========================================================================= */ |
| 470 | int ZEXPORT deflateResetKeep (strm) |
nothing calls this directly
no test coverage detected