can be used outside lzma2_encoder.c.
#include "lzma2_encoder.h"
-/// Maximum number of bytes of actual data per chunk (no headers)
-#define LZMA2_CHUNK_MAX (UINT32_C(1) << 16)
-
-/// Maximum uncompressed size of LZMA chunk (no headers)
-#define LZMA2_UNCOMPRESSED_MAX (UINT32_C(1) << 21)
-
-/// Maximum size of LZMA2 headers
-#define LZMA2_HEADER_MAX 6
-
-/// Size of a header for uncompressed chunk
-#define LZMA2_HEADER_UNCOMPRESSED 3
-
-
struct lzma_coder_s {
enum {
SEQ_INIT,
#include "common.h"
+
+/// Maximum number of bytes of actual data per chunk (no headers)
+#define LZMA2_CHUNK_MAX (UINT32_C(1) << 16)
+
+/// Maximum uncompressed size of LZMA chunk (no headers)
+#define LZMA2_UNCOMPRESSED_MAX (UINT32_C(1) << 21)
+
+/// Maximum size of LZMA2 headers
+#define LZMA2_HEADER_MAX 6
+
+/// Size of a header for uncompressed chunk
+#define LZMA2_HEADER_UNCOMPRESSED 3
+
+
extern lzma_ret lzma_lzma2_encoder_init(
lzma_next_coder *next, lzma_allocator *allocator,
const lzma_filter_info *filters);
//
///////////////////////////////////////////////////////////////////////////////
+#include "lzma2_encoder.h"
#include "lzma_encoder_private.h"
#include "fastpos.h"
if (limit != UINT32_MAX
&& (mf->read_pos - mf->read_ahead >= limit
|| *out_pos + rc_pending(&coder->rc)
- >= (UINT32_C(1) << 16)
+ >= LZMA2_CHUNK_MAX
- LOOP_INPUT_MAX))
break;