Optimize memory layout

This commit is contained in:
Justine Tunney 2022-09-12 04:19:32 -07:00
parent 0305194d98
commit b69f3d2488
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
41 changed files with 383 additions and 347 deletions

View file

@ -122,8 +122,7 @@ void inflate_fast(z_streamp strm, unsigned start) {
bits -= op;
op = (unsigned)(here.op);
if (op == 0) { /* literal */
Tracevv((stderr,
here.val >= 0x20 && here.val < 0x7f
Tracevv((here.val >= 0x20 && here.val < 0x7f
? "inflate: literal '%c'\n"
: "inflate: literal 0x%02x\n",
here.val));
@ -140,7 +139,7 @@ void inflate_fast(z_streamp strm, unsigned start) {
hold >>= op;
bits -= op;
}
Tracevv((stderr, "inflate: length %u\n", len));
Tracevv(("inflate: length %u\n", len));
if (bits < 15) {
hold += (unsigned long)(*in++) << bits;
bits += 8;
@ -174,7 +173,7 @@ void inflate_fast(z_streamp strm, unsigned start) {
#endif
hold >>= op;
bits -= op;
Tracevv((stderr, "inflate: distance %u\n", dist));
Tracevv(("inflate: distance %u\n", dist));
op = (unsigned)(out - beg); /* max distance in output */
if (dist > op) { /* see if copy from window */
op = dist - op; /* distance back in window */
@ -277,7 +276,7 @@ void inflate_fast(z_streamp strm, unsigned start) {
here = lcode[here.val + (hold & ((1U << op) - 1))];
goto dolen;
} else if (op & 32) { /* end-of-block */
Tracevv((stderr, "inflate: end of block\n"));
Tracevv(("inflate: end of block\n"));
state->mode = TYPE;
break;
} else {