Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
block_buffer_encoder.c File Reference

Single-call .xz Block encoder. More...

#include "block_buffer_encoder.h"
#include "block_encoder.h"
#include "filter_encoder.h"
#include "lzma2_encoder.h"
#include "check.h"

Macros

#define HEADERS_BOUND
 

Functions

uint64_t lzma_block_buffer_bound64 (uint64_t uncompressed_size)
 
 LZMA_API (size_t)
 Calculate maximum output size for single-call Block encoding.
 
 LZMA_API (lzma_ret)
 

Detailed Description

Single-call .xz Block encoder.

Macro Definition Documentation

◆ HEADERS_BOUND

#define HEADERS_BOUND
Value:
((1 + 1 + 2 * LZMA_VLI_BYTES_MAX + 3 + 4 \
+ LZMA_CHECK_SIZE_MAX + 3) & ~3)
#define LZMA_CHECK_SIZE_MAX
Maximum size of a Check field.
Definition check.h:102
#define LZMA_VLI_BYTES_MAX
Maximum supported encoded length of variable length integers.
Definition vli.h:44

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.

Function Documentation

◆ LZMA_API() [1/2]

LZMA_API ( lzma_ret )
extern

◆ LZMA_API() [2/2]

LZMA_API ( size_t )
extern

Calculate maximum output size for single-call Block 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().

◆ lzma_block_buffer_bound64()

uint64_t lzma_block_buffer_bound64 ( uint64_t uncompressed_size)
extern

uint64_t version of lzma_block_buffer_bound(). It is used by stream_encoder_mt.c. Probably the original lzma_block_buffer_bound() should have been 64-bit, but fixing it would break the ABI.