Deleted Added
full compact
lzma_encoder.h (292588) lzma_encoder.h (312518)
1///////////////////////////////////////////////////////////////////////////////
2//
3/// \file lzma_encoder.h
4/// \brief LZMA encoder API
5///
6// Authors: Igor Pavlov
7// Lasse Collin
8//
9// This file has been put into the public domain.
10// You can do whatever you want with this file.
11//
12///////////////////////////////////////////////////////////////////////////////
13
14#ifndef LZMA_LZMA_ENCODER_H
15#define LZMA_LZMA_ENCODER_H
16
17#include "common.h"
18
19
1///////////////////////////////////////////////////////////////////////////////
2//
3/// \file lzma_encoder.h
4/// \brief LZMA encoder API
5///
6// Authors: Igor Pavlov
7// Lasse Collin
8//
9// This file has been put into the public domain.
10// You can do whatever you want with this file.
11//
12///////////////////////////////////////////////////////////////////////////////
13
14#ifndef LZMA_LZMA_ENCODER_H
15#define LZMA_LZMA_ENCODER_H
16
17#include "common.h"
18
19
20typedef struct lzma_lzma1_encoder_s lzma_lzma1_encoder;
21
22
20extern lzma_ret lzma_lzma_encoder_init(lzma_next_coder *next,
21 const lzma_allocator *allocator,
22 const lzma_filter_info *filters);
23
24
25extern uint64_t lzma_lzma_encoder_memusage(const void *options);
26
27extern lzma_ret lzma_lzma_props_encode(const void *options, uint8_t *out);
28
29
30/// Encodes lc/lp/pb into one byte. Returns false on success and true on error.
31extern bool lzma_lzma_lclppb_encode(
32 const lzma_options_lzma *options, uint8_t *byte);
33
34
35#ifdef LZMA_LZ_ENCODER_H
36
37/// Initializes raw LZMA encoder; this is used by LZMA2.
38extern lzma_ret lzma_lzma_encoder_create(
23extern lzma_ret lzma_lzma_encoder_init(lzma_next_coder *next,
24 const lzma_allocator *allocator,
25 const lzma_filter_info *filters);
26
27
28extern uint64_t lzma_lzma_encoder_memusage(const void *options);
29
30extern lzma_ret lzma_lzma_props_encode(const void *options, uint8_t *out);
31
32
33/// Encodes lc/lp/pb into one byte. Returns false on success and true on error.
34extern bool lzma_lzma_lclppb_encode(
35 const lzma_options_lzma *options, uint8_t *byte);
36
37
38#ifdef LZMA_LZ_ENCODER_H
39
40/// Initializes raw LZMA encoder; this is used by LZMA2.
41extern lzma_ret lzma_lzma_encoder_create(
39 lzma_coder **coder_ptr, const lzma_allocator *allocator,
42 void **coder_ptr, const lzma_allocator *allocator,
40 const lzma_options_lzma *options, lzma_lz_options *lz_options);
41
42
43/// Resets an already initialized LZMA encoder; this is used by LZMA2.
44extern lzma_ret lzma_lzma_encoder_reset(
43 const lzma_options_lzma *options, lzma_lz_options *lz_options);
44
45
46/// Resets an already initialized LZMA encoder; this is used by LZMA2.
47extern lzma_ret lzma_lzma_encoder_reset(
45 lzma_coder *coder, const lzma_options_lzma *options);
48 lzma_lzma1_encoder *coder, const lzma_options_lzma *options);
46
47
49
50
48extern lzma_ret lzma_lzma_encode(lzma_coder *restrict coder,
51extern lzma_ret lzma_lzma_encode(lzma_lzma1_encoder *restrict coder,
49 lzma_mf *restrict mf, uint8_t *restrict out,
50 size_t *restrict out_pos, size_t out_size,
51 uint32_t read_limit);
52
53#endif
54
55#endif
52 lzma_mf *restrict mf, uint8_t *restrict out,
53 size_t *restrict out_pos, size_t out_size,
54 uint32_t read_limit);
55
56#endif
57
58#endif