Alternatively,thecontentsofthisfilemaybeusedunderthetermsofthe MozillaPublicLicense(http://mozilla.org/MPL) or the GNU General Public License,aspublishedbytheFreeSoftwareFoundation,eitherversion2 oftheLicenseor(atyouroption)anylaterversion.
*/ #include <cassert>
while (read_sequence(src, src_end, literal, literal_len, match_len,
match_dist))
{ if (literal_len != 0)
{ // Copy in literal. At this point the a minimal literal + minminal // match plus the coda (1 + 2 + 5) must be 8 bytes or more allowing // us to remain within the src buffer for an overrun_copy on // machines upto 64 bits. if (align(literal_len) > out_size) return -1;
dst = overrun_copy(dst, literal, literal_len);
out_size -= literal_len;
}
// Copy, possibly repeating, match from earlier in the // decoded output.
u8 const * const pcpy = dst - match_dist; if (pcpy < static_cast<u8*>(out)
|| match_len > unsigned(out_size - LASTLITERALS) // Wrap around checks:
|| out_size < LASTLITERALS || pcpy >= dst) return -1; if (dst > pcpy+sizeof(unsignedlong)
&& align(match_len) <= out_size)
dst = overrun_copy(dst, pcpy, match_len); else
dst = safe_copy(dst, pcpy, match_len);
out_size -= match_len;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.