|
XZ Utils
5.2.2
|
Encodes the Index field. More...
Data Structures | |
| struct | lzma_coder_s |
Functions | |
| static lzma_ret | index_encode (lzma_coder *coder, const 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, const 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, const lzma_allocator *allocator, const lzma_index *i) |
| lzma_ret | lzma_index_encoder (lzma_stream *strm, const lzma_index *i) |
| Initialize .xz Index encoder. More... | |
| 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. More... | |
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_BUF_ERROR, lzma_index_size(), and LZMA_PROG_ERROR.
1.8.13