Rizin
unix-like reverse engineering framework and cli tools
delta_common.h File Reference

Common stuff for Delta encoder and decoder. More...

#include "common.h"

Go to the source code of this file.

Functions

uint64_t lzma_delta_coder_memusage (const void *options)
 

Detailed Description

Common stuff for Delta encoder and decoder.

Definition in file delta_common.h.

Function Documentation

◆ lzma_delta_coder_memusage()

uint64_t lzma_delta_coder_memusage ( const void *  options)

Definition at line 63 of file delta_common.c.

64 {
65  const lzma_options_delta *opt = options;
66 
67  if (opt == NULL || opt->type != LZMA_DELTA_TYPE_BYTE
68  || opt->dist < LZMA_DELTA_DIST_MIN
69  || opt->dist > LZMA_DELTA_DIST_MAX)
70  return UINT64_MAX;
71 
72  return sizeof(lzma_delta_coder);
73 }
#define NULL
Definition: cris-opc.c:27
@ LZMA_DELTA_TYPE_BYTE
Definition: delta.h:36
#define LZMA_DELTA_DIST_MIN
Definition: delta.h:60
#define LZMA_DELTA_DIST_MAX
Definition: delta.h:61
static const char struct stat static buf struct stat static buf static vhangup int options
Definition: sflib.h:145
#define UINT64_MAX
Options for the Delta filter.
Definition: delta.h:45
uint32_t dist
Delta distance.
Definition: delta.h:59
lzma_delta_type type
Definition: delta.h:47

References lzma_options_delta::dist, LZMA_DELTA_DIST_MAX, LZMA_DELTA_DIST_MIN, LZMA_DELTA_TYPE_BYTE, NULL, options, lzma_options_delta::type, and UINT64_MAX.

Referenced by lzma_delta_coder_init(), and lzma_delta_props_encode().