Single-call .xz Block encoder. More...
#include "block_encoder.h"#include "filter_encoder.h"#include "lzma2_encoder.h"#include "check.h"Defines | |
| #define | HEADERS_BOUND |
Functions | |
| static lzma_vli | lzma2_bound (lzma_vli uncompressed_size) |
| LZMA_API (size_t) | |
| Calculate maximum output buffer size for single-call encoding. | |
| static lzma_ret | block_encode_uncompressed (lzma_block *block, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) |
| static lzma_ret | block_encode_normal (lzma_block *block, lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) |
| LZMA_API (lzma_ret) | |
Single-call .xz Block encoder.
| #define HEADERS_BOUND |
((1 + 1 + 2 * LZMA_VLI_BYTES_MAX + 3 + 4 \ + LZMA_CHECK_SIZE_MAX + 3) & ~3)
Estimate the maximum size of the Block Header and Check fields for a Block that uses LZMA2 uncompressed chunks. We could use lzma_block_header_size() but this is simpler.
Block Header Size + Block Flags + Compressed Size + Uncompressed Size + Filter Flags for LZMA2 + CRC32 + Check and round up to the next multiple of four to take Header Padding into account.
Referenced by LZMA_API().
| LZMA_API | ( | size_t | ) |
Calculate maximum output buffer size for single-call encoding.
Calculate output buffer size for single-call Stream encoder.
This is equivalent to lzma_stream_buffer_bound() but for .xz Blocks. See the documentation of lzma_stream_buffer_bound().
References HEADERS_BOUND, and LZMA_VLI_C.
1.6.1