2007-12-08 23:42:33 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
/// \file lzma_encoder.h
|
2008-08-28 21:53:15 +02:00
|
|
|
/// \brief LZMA encoder API
|
2009-04-13 10:27:40 +02:00
|
|
|
///
|
|
|
|
// Authors: Igor Pavlov
|
|
|
|
// Lasse Collin
|
2007-12-08 23:42:33 +01:00
|
|
|
//
|
2009-04-13 10:27:40 +02:00
|
|
|
// This file has been put into the public domain.
|
|
|
|
// You can do whatever you want with this file.
|
2007-12-08 23:42:33 +01:00
|
|
|
//
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef LZMA_LZMA_ENCODER_H
|
|
|
|
#define LZMA_LZMA_ENCODER_H
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
2008-08-28 21:53:15 +02:00
|
|
|
|
2007-12-08 23:42:33 +01:00
|
|
|
extern lzma_ret lzma_lzma_encoder_init(lzma_next_coder *next,
|
|
|
|
lzma_allocator *allocator, const lzma_filter_info *filters);
|
|
|
|
|
2008-08-28 21:53:15 +02:00
|
|
|
|
|
|
|
extern uint64_t lzma_lzma_encoder_memusage(const void *options);
|
|
|
|
|
|
|
|
extern lzma_ret lzma_lzma_props_encode(const void *options, uint8_t *out);
|
|
|
|
|
|
|
|
|
|
|
|
/// Encodes lc/lp/pb into one byte. Returns false on success and true on error.
|
|
|
|
extern bool lzma_lzma_lclppb_encode(
|
2007-12-08 23:42:33 +01:00
|
|
|
const lzma_options_lzma *options, uint8_t *byte);
|
|
|
|
|
2008-08-28 21:53:15 +02:00
|
|
|
|
|
|
|
#ifdef LZMA_LZ_ENCODER_H
|
|
|
|
|
|
|
|
/// Initializes raw LZMA encoder; this is used by LZMA2.
|
|
|
|
extern lzma_ret lzma_lzma_encoder_create(
|
|
|
|
lzma_coder **coder_ptr, lzma_allocator *allocator,
|
|
|
|
const lzma_options_lzma *options, lzma_lz_options *lz_options);
|
|
|
|
|
|
|
|
|
|
|
|
/// Resets an already initialized LZMA encoder; this is used by LZMA2.
|
2008-12-09 16:41:49 +01:00
|
|
|
extern lzma_ret lzma_lzma_encoder_reset(
|
2008-08-28 21:53:15 +02:00
|
|
|
lzma_coder *coder, const lzma_options_lzma *options);
|
|
|
|
|
|
|
|
|
|
|
|
extern lzma_ret lzma_lzma_encode(lzma_coder *restrict coder,
|
|
|
|
lzma_mf *restrict mf, uint8_t *restrict out,
|
|
|
|
size_t *restrict out_pos, size_t out_size,
|
|
|
|
uint32_t read_limit);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|