Encodes the Index field. More...
#include "index_encoder.h"#include "index.h"#include "check.h"Data Structures | |
| struct | lzma_coder_s | 
Functions | |
| static lzma_ret | index_encode (lzma_coder *coder, lzma_allocator *allocator lzma_attribute((unused)), const uint8_t *restrict in lzma_attribute((unused)), size_t *restrict in_pos lzma_attribute((unused)), size_t in_size lzma_attribute((unused)), uint8_t *restrict out, size_t *restrict out_pos, size_t out_size, lzma_action action lzma_attribute((unused))) | 
| static void | index_encoder_end (lzma_coder *coder, lzma_allocator *allocator) | 
| static void | index_encoder_reset (lzma_coder *coder, const lzma_index *i) | 
| lzma_ret | lzma_index_encoder_init (lzma_next_coder *next, lzma_allocator *allocator, const lzma_index *i) | 
| lzma_ret | lzma_index_encoder (lzma_stream *strm, const lzma_index *i) | 
| Initialize .xz Index encoder.   | |
| lzma_ret | lzma_index_buffer_encode (const lzma_index *i, uint8_t *out, size_t *out_pos, size_t out_size) | 
| Single-call .xz Index encoder.   | |
Encodes the Index field.
| lzma_ret lzma_index_encoder | ( | lzma_stream * | strm, | |
| const lzma_index * | i | |||
| ) | 
Initialize .xz Index encoder.
| strm | Pointer to properly prepared lzma_stream | |
| i | Pointer to lzma_index which should be encoded. | 
The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH. It is enough to use only one of them (you can choose freely; use LZMA_RUN to support liblzma versions older than 5.0.0).
References lzma_next_strm_init.
| lzma_ret lzma_index_buffer_encode | ( | const lzma_index * | i, | |
| uint8_t * | out, | |||
| size_t * | out_pos, | |||
| size_t | out_size | |||
| ) | 
Single-call .xz Index encoder.
| i | lzma_index to be encoded | |
| out | Beginning of the output buffer | |
| out_pos | The next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds. | |
| out_size | Size of the out buffer; the first byte into which no data is written to is out[out_size]. | 
References lzma_index_size(), LZMA_RUN, and LZMA_STREAM_END.
Referenced by lzma_stream_buffer_encode().
 1.7.1