XZ Utils  5.2.10
Functions
block_buffer_decoder.c File Reference

Single-call .xz Block decoder. More...

#include "block_decoder.h"

Functions

lzma_ret lzma_block_buffer_decode (lzma_block *block, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)
 Single-call .xz Block decoder. More...
 

Detailed Description

Single-call .xz Block decoder.

Function Documentation

◆ lzma_block_buffer_decode()

lzma_ret lzma_block_buffer_decode ( lzma_block block,
const lzma_allocator allocator,
const uint8_t *  in,
size_t *  in_pos,
size_t  in_size,
uint8_t *  out,
size_t *  out_pos,
size_t  out_size 
)

Single-call .xz Block decoder.

This is single-call equivalent of lzma_block_decoder(), and requires that the caller has already decoded Block Header and checked its memory usage.

Parameters
blockBlock options just like with lzma_block_decoder().
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
inBeginning of the input buffer
in_posThe next byte will be read from in[*in_pos]. *in_pos is updated only if decoding succeeds.
in_sizeSize of the input buffer; the first byte that won't be read is in[in_size].
outBeginning of the output buffer
out_posThe next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds.
out_sizeSize of the out buffer; the first byte into which no data is written to is out[out_size].
Returns
- LZMA_OK: Decoding was successful.
  • LZMA_OPTIONS_ERROR
  • LZMA_DATA_ERROR
  • LZMA_MEM_ERROR
  • LZMA_BUF_ERROR: Output buffer was too small.
  • LZMA_PROG_ERROR