* symbols from which it is being constructed.
*/
-#ifdef LIT_MEM
- s->pending_buf = (unsigned char *) ZALLOC(strm, s->lit_bufsize, 5);
-#else
- s->pending_buf = (unsigned char *) ZALLOC(strm, s->lit_bufsize, 4);
-#endif
+ s->pending_buf = (unsigned char *) ZALLOC(strm, s->lit_bufsize, LIT_BUFS);
s->pending_buf_size = s->lit_bufsize * 4;
if (s->window == NULL || s->prev == NULL || s->head == NULL || s->pending_buf == NULL) {
ds->window = (unsigned char *) ZALLOC_WINDOW(dest, ds->w_size + window_padding, 2*sizeof(unsigned char));
ds->prev = (Pos *) ZALLOC(dest, ds->w_size, sizeof(Pos));
ds->head = (Pos *) ZALLOC(dest, HASH_SIZE, sizeof(Pos));
- ds->pending_buf = (unsigned char *) ZALLOC(dest, ds->lit_bufsize, 4);
+ ds->pending_buf = (unsigned char *) ZALLOC(dest, ds->lit_bufsize, LIT_BUFS);
if (ds->window == NULL || ds->prev == NULL || ds->head == NULL || ds->pending_buf == NULL) {
PREFIX(deflateEnd)(dest);
memcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(unsigned char));
memcpy((void *)ds->prev, (void *)ss->prev, ds->w_size * sizeof(Pos));
memcpy((void *)ds->head, (void *)ss->head, HASH_SIZE * sizeof(Pos));
- memcpy(ds->pending_buf, ss->pending_buf, ds->pending_buf_size);
+ memcpy(ds->pending_buf, ss->pending_buf, ds->lit_bufsize * LIT_BUFS);
ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
#ifdef LIT_MEM