1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

Clean up a few FIXMEs and TODOs.

lzma_chunk_size() was commented out because it is
currently useless.
This commit is contained in:
Lasse Collin 2010-10-19 11:44:37 +03:00
parent ce34ec4f54
commit 0076e03641
6 changed files with 8 additions and 7 deletions

View file

@ -226,6 +226,7 @@ lzma_raw_encoder_memusage(const lzma_filter *filters)
} }
/*
extern LZMA_API(lzma_vli) extern LZMA_API(lzma_vli)
lzma_chunk_size(const lzma_filter *filters) lzma_chunk_size(const lzma_filter *filters)
{ {
@ -247,6 +248,7 @@ lzma_chunk_size(const lzma_filter *filters)
return max; return max;
} }
*/
extern LZMA_API(lzma_ret) extern LZMA_API(lzma_ret)

View file

@ -16,8 +16,8 @@
#include "common.h" #include "common.h"
// FIXME !!! Public API // FIXME: Might become a part of the public API once finished.
extern lzma_vli lzma_chunk_size(const lzma_filter *filters); // extern lzma_vli lzma_chunk_size(const lzma_filter *filters);
extern lzma_ret lzma_raw_encoder_init( extern lzma_ret lzma_raw_encoder_init(

View file

@ -191,7 +191,6 @@ lzma2_decode(lzma_coder *restrict coder, lzma_dict *restrict dict,
case SEQ_COPY: { case SEQ_COPY: {
// Copy from input to the dictionary as is. // Copy from input to the dictionary as is.
// FIXME Can copy too much?
dict_write(dict, in, in_pos, in_size, &coder->compressed_size); dict_write(dict, in, in_pos, in_size, &coder->compressed_size);
if (coder->compressed_size != 0) if (coder->compressed_size != 0)
return LZMA_OK; return LZMA_OK;

View file

@ -656,7 +656,8 @@ lzma_decode(lzma_coder *restrict coder, lzma_dict *restrict dictptr,
} }
case SEQ_EOPM: case SEQ_EOPM:
// TODO Comment // LZMA1 stream with
// end-of-payload marker.
rc_normalize(SEQ_EOPM); rc_normalize(SEQ_EOPM);
ret = LZMA_STREAM_END; ret = LZMA_STREAM_END;
goto out; goto out;
@ -856,7 +857,6 @@ lzma_decoder_reset(lzma_coder *coder, const void *opt)
// NOTE: We assume that lc/lp/pb are valid since they were // NOTE: We assume that lc/lp/pb are valid since they were
// successfully decoded with lzma_lzma_decode_properties(). // successfully decoded with lzma_lzma_decode_properties().
// FIXME?
// Calculate pos_mask. We don't need pos_bits as is for anything. // Calculate pos_mask. We don't need pos_bits as is for anything.
coder->pos_mask = (1U << options->pb) - 1; coder->pos_mask = (1U << options->pb) - 1;

View file

@ -334,7 +334,7 @@ lzma_lzma_encode(lzma_coder *restrict coder, lzma_mf *restrict mf,
// With LZMA2 we need to take care that compressed size of // With LZMA2 we need to take care that compressed size of
// a chunk doesn't get too big. // a chunk doesn't get too big.
// TODO // FIXME? Check if this could be improved.
if (limit != UINT32_MAX if (limit != UINT32_MAX
&& (mf->read_pos - mf->read_ahead >= limit && (mf->read_pos - mf->read_ahead >= limit
|| *out_pos + rc_pending(&coder->rc) || *out_pos + rc_pending(&coder->rc)

View file

@ -16,7 +16,7 @@ enum message_verbosity {
V_ERROR, ///< Only error messages V_ERROR, ///< Only error messages
V_WARNING, ///< Errors and warnings V_WARNING, ///< Errors and warnings
V_VERBOSE, ///< Errors, warnings, and verbose statistics V_VERBOSE, ///< Errors, warnings, and verbose statistics
V_DEBUG, ///< Debugging, FIXME remove? V_DEBUG, ///< Very verbose
}; };