Path: blob/master/Utilities/cmliblzma/liblzma/lzma/lzma_encoder.h
3156 views
// SPDX-License-Identifier: 0BSD12///////////////////////////////////////////////////////////////////////////////3//4/// \file lzma_encoder.h5/// \brief LZMA encoder API6///7// Authors: Igor Pavlov8// Lasse Collin9//10///////////////////////////////////////////////////////////////////////////////1112#ifndef LZMA_LZMA_ENCODER_H13#define LZMA_LZMA_ENCODER_H1415#include "common.h"161718typedef struct lzma_lzma1_encoder_s lzma_lzma1_encoder;192021extern lzma_ret lzma_lzma_encoder_init(lzma_next_coder *next,22const lzma_allocator *allocator,23const lzma_filter_info *filters);242526extern uint64_t lzma_lzma_encoder_memusage(const void *options);2728extern lzma_ret lzma_lzma_props_encode(const void *options, uint8_t *out);293031/// Encodes lc/lp/pb into one byte. Returns false on success and true on error.32extern bool lzma_lzma_lclppb_encode(33const lzma_options_lzma *options, uint8_t *byte);343536#ifdef LZMA_LZ_ENCODER_H3738/// Initializes raw LZMA encoder; this is used by LZMA2.39extern lzma_ret lzma_lzma_encoder_create(40void **coder_ptr, const lzma_allocator *allocator,41lzma_vli id, const lzma_options_lzma *options,42lzma_lz_options *lz_options);434445/// Resets an already initialized LZMA encoder; this is used by LZMA2.46extern lzma_ret lzma_lzma_encoder_reset(47lzma_lzma1_encoder *coder, const lzma_options_lzma *options);484950extern lzma_ret lzma_lzma_encode(lzma_lzma1_encoder *restrict coder,51lzma_mf *restrict mf, uint8_t *restrict out,52size_t *restrict out_pos, size_t out_size,53uint32_t read_limit);5455#endif5657#endif585960