]> icculus.org git repositories - icculus/xz.git/commit
Combine lzma_options_block validation needed by both Block
authorLasse Collin <lasse.collin@tukaani.org>
Fri, 25 Jan 2008 21:12:36 +0000 (23:12 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Fri, 25 Jan 2008 21:12:36 +0000 (23:12 +0200)
commit4441e004185cd4c61bda184010eca5924c9dec87
treecaa5306e1d0807bdeca57ca2d7e159360405702f
parentbf4200c818fcf9102e56328d39cde91bfa13cfb6
Combine lzma_options_block validation needed by both Block
encoder and decoder, and put the shared things to
block_private.h. Improved the checks a little so that
they may detect too big Compressed Size at initialization
time if lzma_options_block.total_size or .total_limit is
known.

Allow encoding and decoding Blocks with combinations of
fields that are not allowed by the file format specification.
Doing this requires that the application passes such a
combination in lzma_options_lzma; liblzma doesn't do that,
but it's not impossible that someone could find them useful
in some custom file format.
src/liblzma/common/block_decoder.c
src/liblzma/common/block_encoder.c
src/liblzma/common/block_private.h